We use Zoho Desk. Our large client uses WebToCase form to submit tickets.
I have two workflow rules:
When a contact is created and its email ends with example.com, it runs a custom function, which assigns the new contact the right account Example with ID 48000000012345678:
- orgId = 20071234567;
- accountId = "48000000012345678";
- recordValue = Map();
- recordValue.put("accountId",accountId);
- c = zoho.desk.update(orgId,"Contacts",contactId,recordValue,"zohodeskcontactupdate");
- info c;
That results with the contact belonging to the account. I see "accountId":"48000000012345678" in the response.
The other workflow rule is similar. When a new ticket is created, and its email ends with example.com, it runs a custom function, which should assign the new contact the same account:
- orgId = 20071234567;
- accountId = "48000000012345678";
- recordValue = Map();
- recordValue.put("accountId",accountId);
- t = zoho.desk.update(orgId,"Tickets",ticketId,recordValue,"zohodeskcontactupdate");
But the ticket is not associated with the account. I see "accountId":null in the result.
The issue is also somewhat intermittent, as during the development, sometimes it actually worked.