ZOHO CRM Variables provide the ability to store static values that can be updated in one spot and used across multiple functions within a ZOHO deployment.
Specific Events, Actions or responses to another function call can create a requirement to iterate or update these static CRM Variables and it would be much nicer to handle this programatically with a Standalone Function.
EDIT : Specific Events, Actions or Responses to another function call can create a requirement to update or iterate these static CRM Variables. Rather than simply using the invokeConnector Deluge task which is a wrapper function for the invokeurl API call, it would be nice to run our own business logic with the update and handle this within a wrapper function like invokeConnector that we can define and call with minimal inputs across our deployment, this is achieved with a Standalone Function.
NOTE: Additional features are not covered under this Discussion.
Using the invokeurl webhook method requires a Connection within your ZOHO deployment to make an API call to the CRM Variables endpoint. If you do not already have one setup, follow the ZOHO Developer docs here -> zoho.com/crm/developer/docs/connectors/set-up.html
This example uses the id of an existing CRM Variable within your ZOHO CRM deployment. If you do not already have a CRM Variable setup, we'll do that now. If you do, copy the id and save that for a later step.
To create a CRM Variable go to Setup -> Developer Space -> ZOHO CRM Variables -> Create New Variable
We will now create the Standalone Function which can be called from any other function or WorkFlow.
To setup the standalone function:
Edit your standalone function as below to use an API call :
Or edit your standalone function as below to use the invokeConnector :
We can now move on to the requesting function.
To setup a requesting function:
Edit your standalone function as below :
When you execute this requesting function, you should see the response printed in the console:
To check this has worked:
Go to Setup -> Developer Space -> ZOHO CRM Variables
Using this method you can now automate updates on ZOHO CRM Variables.
The entire ZOHO ecosystem is API driven and clearly the invokeConnector deluge task does the same/similar thing under the hood as the invokeurl webhook. invokeConnector can also be used within the Standalone function to do the update, which method you use is really irrelevant to the outcome as they are functionally the same.
However, if you are applying the method in this Discussion to other use cases the invokeConnector is limited to existing predefined Associated Connectors or building your own ZOHO CRM Vertical Solution which adds its own inherent complexity.
If you want to do more than just update one record or you have specific dependent business logic you need to reuse across your ZOHO deployment, but want a reusable function, a Standalone function can provide the same simple features of the invokeConnector, with the added flexibility of computing additional business logic with flexible and definable inputs from the requesting function.
Writer is a powerful online word processor, designed for collaborative work.