Help Request: Custom Function to Update Contact Type in Zoho Desk
Hello,
Can't seem to make this work and hoping I can get some help.
I want to update the Contact Type for every new Contact created in Zoho Desk. For one department I need the type to be End User and for another department I need this to be Contact.
Has anyone written a Deluge script that can handle this?
I have this script but I cannot get it to work because Contact Type is not a custom field and any modifications to the field names in the script have not been successful.
zohoSupportAuthtoken = "XXXXXXXXXXXX";
orgId = "XXXXXXXXXXXX";
searchcontacts = zoho.desk.searchRecords(orgId, "tickets",{"contactId":CID},0,1);
depart = invokeurl
[
type: GET
headers:{"orgId":orgId,"Authorization":"Zoho-authtoken " + zohoSupportAuthtoken}
];
info zoho.desk.update(orgId,"contacts",CID,{"cf":{"cf_contact_type":depart.getJSON("name")}});