Territories are a data-sharing structure that allows you to hide certain records from users based off record-level criteria. When you assign a territory to an Account, the system automatically assigns that territory to all related Contacts. However, when there is more than one territory assigned, the workflow does not repeat (eg; if an Account is assigned Territory1, Territory2 and Territory3, the related Contacts are only assinged Territory1). This script makes sure that ALL territories assigned in an Account gets assigned to ALL related Contacts by getting the territory IDs off the Account, then assigning them in Contacts via Territories API.
In order to call the Zoho CRM API within a Deluge Script, you must first create a connection to it.
Zoho OAuth Connections needed:
LISTvariable and use a
LOOPto add all the territory IDs in the list container.
LOOPto iterate through every Contacts, and another
LOOPinside it to iterate through every ID in the territory ID list. Here, another API call is used to assign the territories to the Contacts.
Note: +”” is added after paramap to convert it to string for the function to work
Learn to create a customized inventory report with Zoho Analytics. This tutorial contains a link to our GitHub page for SQL code that will help with your table creations....
Whether you work primarily out of CRM or the Zoho Finance Suite, you can use Analytics to build commissions dashboards. This involves some fairly simple SQL code....