Stucked with Zoho Deluge function Integrating Zoho Form and Zoho CRM

97 views Asked by At

Good morning/afternoon/evening, community. I'm encountering an issue while using Zoho Flow to create a record upon the submission of a Zoho Form (I'm not using the native integration because this form is intended for clients). The problem is that I have fields that are checkboxes, and every output from the form is input as a string when creating a new record in Zoho CRM. As a result, I never get a boolean value for the checkboxes in Zoho CRM.

This is my actual function:

bool marketing_checkbox_boolean(list marketing_requires_list)
{
marketing_fullList = {"Create newsletters (Mkt - admin)","Create social media calendar","Post on Social Medias (LinkedIn/Facebook/Instagram/Twitter)","Send Newsletters","Monitor online traffic and report results.","Assist with the web design and development.","Create simple graphics on Canva","Create videos","Create posts about success stories.","Reply messages on social media","Delete/Report negative comments on social media (LinkedIn/Facebook/Instagram/Twitter)","Website Audit for outdated information.","Help to create sales materials (i.e./Presentations/Banners/Mailings/Brochures/Decks)"};
verification = marketing_fullList.contains(marketing_requires_list);
return verification;
}

I was told about a function called map() that might help me, but I can't find it on the Zoho Deluge page. I would really appreciate any assistance.

2 Images Attached, Regards. Fail Details Screen of the flow

I Tryed the native integration of Zoho CRM in Zoho Form but the client is going to fill the form, so I cant add the Zoho CRM integration Field.

I'm seeking guidance on where to turn for help, as I'm currently stuck. Alternatively, a more comprehensive guide on Zoho Deluge would be greatly appreciated, since the information on Zoho's page is neither complete nor clear.

4

There are 4 answers

1
David Afolabi On

Not sure I fully understand the issue you are trying to describe, however, here is what I think understand from what you've said. You are trying to use deluge scripting/custom code to create a CRM record upon submission of Zoho form data, but you are having issues with getting the checkboxes from the form to the CRM record. If this understanding is correct, my assumption is that you are passing the boolean value as string. Here is what the data you are passing should look like;

"fieldName": true

Put that in your maplist or what is called the dictionary of data you are creating a record with. Hope this helps.

1
David Afolabi On

Also, map can be better thought of as a data type similar to what is called a dictionary in Python. The map allows you to create a map variable with key-value pairs. See here

0
Usman Ghani On

You can create a map veriable like this:

var1=Map();
var1.put("Key 1", "Value1");
var1.put("Key 2", "Value2");

For more help on map variables: see this link on Zoho site: https://www.zoho.com/deluge/help/functions/key-value.html

For Deluge full list of functions: https://deluge.zoho.com/help/builtinfunctions

0
David Afolabi On

On second look at the modified question, my assumption is;

  1. You didn't create any custom function to be executed in the function in the flow

  2. I took a look at your sample function, and I assume that the marketing_fullList is your map list containing the checkbox fields and that "Create newsletters (Mkt - admin)","Create social media calendar","Post on Social Medias (LinkedIn/Facebook/Instagram/Twitter)","Send Newsletters" etc., are all different fields in the module in your CRM. If that is correct, then what you need to do is "map" all the fields you want to create into a list of key:values. So, for example, if "Create newsletters (Mkt - admin)" and "Create social media calendar" are both fields in your CRM, then your function in Flow will look like this;

    void marketing_checkbox_boolean(string Create_newsletters_Mkt_admin), string Create_social_media_calendar) { valuesMap = Map(); valuesMap.put("Create newsletters (Mkt - admin)": true); valuesMap.put("Create social media calendar": true); marketing_fullList = zoho.crm.createRecord("CRM_Module_Name", valuesMap, "connectionName");

    info marketing_fullList;

    }