Invoke Connector Task

Invoke Connector Task

Table of Contentsup

Once the connector is published and associated with the plugin, it has to be invoked every time the necessary criteria is achieved. This invoke action can be achieved with the help of a custom function.

 Syntax

<CRM Response> =zoho.crm.invokeConnector("API unique identifier",map);

where,

Map() function is used to map any dynamic value present in the connector to the fields of Zoho CRM.

<CRM Response> is the map variable returned by CRM as response.

To get the API identifier

  • In the plugin's details page click Connectors and select the connector to be invoked.
  • Click View All APIs, then click on the API that has to be invoked along with the connector.

Example

Post data from CRM to your third party account.
For example, let us say you want to add the contacts from your CRM to Google Contacts whenever a new contact is added whose mailing country is India. To achieve this you need to write a custom function to invoke the connector and associate the custom function to a workflow rule. In the workflow rule you create, do the following: set module as Contacts to be executed based on a record action whenever a record is created and set the criteria as Mailing country is India. Under actions select Call Custom Functions and add the custom function you have created and click save.
The custom function for the case mentioned above is :

Fnam = input.contact.get("First_Name");
Lnam = input.contact.get("Last_Name");
mail = input.contact.get("Email");
Mob = input.contact.get("Mobile");
map = { "Fname" : Fnam, "Lname" : Lnam, "Email" : mail, "Mobile" : Mob};
response = zoho.crm.invokeConnector("googledrive.contacts",map);

 Related Links

https://www.zoho.com/developer/help/extensions/automation/custom-functions.html 

Share this post :

FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeveloper.com