Auto Export for the Custom Modules
How to achieve Auto export for the Custom Modules in the AppiWorks extension?
If you want to automatically export the content of your custom modules to external applications, you will need to configure Zoho CRM automation workflow rules and create a custom function to trigger AppiWorks. Please follow the instructions below.
Step 1: Configure automation workflow rule
Log in to your Zoho CRM account using your credentials.
Click on the "Settings" icon (gear icon) in the upper-right corner.
Under "Setup," select "Automation."
In the Automation section, click on "Workflow Rules."
Click the "Create Rule" button to create a new workflow rule.
Give your rule a name and description for reference.
Choose the custom module you want to apply the rule to from the "Module" dropdown.
Choose when the rule should be evaluated. If you require the workflow to trigger for both create and edit then choose as shown on the right side.
Specify what actions should occur when the rule criteria are met. Here choose Function as an action.
Step 2: Configure a new Function to trigger AppiWorks
***Important Note***
The below example is explained for the PostgreSQL AppiWorks.
Please ensure to use the appropriate extension namespace from the below list
Google Sheets AppiWorks - googlesheetsappiworksforzohocrm
MySQL AppiWorks - mysqlappiworksforzohocrm
Configure the Function, and choose the "Write your own" option.
Give the function name and display name as written below.
Function Name: triggerPostgreSQLAppiWorksForCustomModule
Display Name:
Trigger PostgreSQL AppiWorks For Custom Module
As you can see on the right side, add the below line in the script editor.
{replacewithnamespace}.invokeExecuteServicesEndpoint(moduleId,id);
Example
postgresqlappiworksforzohocrm.invokeExecuteServicesEndpoint(moduleId,id);
Step 3: Setup Argument mapping to your Custom Module
Click on Edit Arguments
Do the argument mapping, and provide your custom module API name as moduleId and dynamic record ID field for your custom module.
Save your arguments changes
Save the custom function.
Save your workflow rule.
Step 4: Configure an Export type service on your Custom Module
Finally, configure an export-type service in AppiWorks for your Custom Module with relevant field mapping. Refer to the above section on configuring export service. The workflow rule will be triggered on creating or editing a record in the Configured custom module.
Test it and roll it out to widespread usage 🚀