By default, Mapsly imports changes from Zoho CRM by schedule with 10-, 20-, 30-minute or 1-hour intervals. But when you need changes in Zoho CRM to be immediately reflected in Mapsly, for example if you'd like your Leads to be assigned to your Mapsly territories in real time, you can use Zoho CRM webhooks with Mapsly API to create, update and delete data in Mapsly immediately.
This guide will help you set up real-time sync of new Leads to Mapsly:
1. Generate API key for your data source in Mapsly
First, generate the API key as described in this guide.
2. Create a Webhook in Zoho CRM for new Leads
IMPORTANT: Zoho CRM restricts the maximum number of data fields that can be passed as parameters by webhooks or custom functions to an external API to 10, so please choose up to 10 fields that you'd like to send to Mapsly.
In Zoho CRM:
1- Go to Setup -> Automation: Workflow Rules:
2- Click Create Rule, select Leads and enter a name for your workflow:
3- Select Created as the record action, select All Leads in the condition and in the Instant Actions select Webhook:
4- Click New Webhook:
select Method GET
enter URL to Notify: https://api.mapsly.com/v1/updaterecord
fill in the URL parameters with your Lead fields (up to 10 fields)
in the Custom parameters add two parameters:
- enter your API key as the apikey parameter
- enter Leads as the entity parameter
Make sure the result looks like this:
Then click Save and Associate.
IMPORTANT! Object and field names in Mapsly are case-sensitive, so be sure to enter them exactly as they appear in Object & fields in your Zoho CRM data source:
3. Create a Webhook in Zoho CRM for updated addresses in existing Leads
A workflow rule above alone will work perfectly if a Lead is created with the address fields filled in. However, if the address is entered after a Lead is created and you'd like to update the address in Mapsly for this Lead immediately, you'll need to create one more workflow rule that will be triggered when address fields change.
1- Go to Setup -> Workflow Rules, create another workflow rule, and in its When section:
[1] select Field update as the record action
[2] check the "Repeat this workflow ..." box
[3] select fields Street, City and State
[4] select Any
Make sure the result looks like this:
3- Then, like in the previous workflow rule, select All leads in the Condition.
4- In Instant Actions select Webhook and select the previously created webhook (there's no need to create a new webhook, since the call to Mapsly to update an existing record is exactly the same as to create a new one):
Click Associate.