If you’re looking to learn Deluge, you’ve come to the right place! In this tutorial, we introduce you to the deluge editor and how to read data.
Key Takeaways
Creating Your First Deluge Function
In the CRM Settings, head into Functions under the Developer Space. Click the blue New Function button to start creating. We recommend naming the function by what it is that function is doing. In this example, our function will be getting a deal’s stage, so we named it Get a Deal Stage. Drag and drop the Zoho integration into the editor and give the variable a name by clicking the little blue pencil. Here you will also want to select the product you are using, the function you are trying to perform, and the parameters that specify what information you want to pull.
If you want to manually write out the line of code instead of using the drag-and-drop options, you can do so! There are a lot of auto-complete options that make this process not as scary as it may seem. Anytime you want to get or send information from Zoho, you can type zoho. and it will automatically generate a drop-down list of applications for you to choose from. Continue to write a period after each section in your line of code to generate drop-down lists of items to add. Sometimes it will autogenerate an option that isn’t actually what is needed. You can tell this by using the type of data it is asking for. In this example, the autogenerated value is “deal” however it needs a number to complete the line.
Once your function is completed, click the Save & Execute button to run the function. A notification will pop up on the screen letting you know that the function either executed successfully or failed. However, at this point, you won’t see any information in that notification. You will need to add an info statement to the function to populate it into the notification after running. The info populated will be in JSON, you can copy this into a JSON viewer to read the data a lot easier.
Getting Specific Information
While you may have populated all the info, there is a simpler way to get a specific piece of information out of this data. In our example, we want to know the deal stage. Start a new line with your variable followed by a period. Like before an autogenerated list of options will pop up for you to select. Here we choose the “get” option and write in the field we are looking for “Stage”. Make sure to associate this line with a variable or you will get an error back.
Right now our function is directly written with one value, also known as hard coding. To create a function that works for multiple values, we will need to Edit Arguments. Here is where you can name the variable type so that when you hit Save & Execute, a popup will ask what exact variable you are looking for.
Additional Resources
After you read data with Deluge, it’s time to edit that data! Watch our next video tutorial in this series! Want to learn more about Deluge? Check out our other resources which include videos, articles, and guides by clicking here to visit the Deluge resource page.