2) They transition to Sales module via workflow when selecting a transition of "made contact"
3) Once in Sales, if "New Appointment" is selected a new record is created in a custom Module Sales to Campaigns
4) All contacts in sales to campaigns are synced with Zoho Campaigns and a drip campaign begins.
All of this works well. But, if fields change in the Sales Module (Stage, Date, etc) how do I update the info in the corresponding "Sales to Campaigns" Module?
I have tried using a deluge script like so that is fired on feild update in a work flow rule:
- saleIdLong = input.saleId.toLong();
- saleDetails = zoho.crm.getRecordById("Sales",saleIdLong);
- mp = map();
- mp.put("Stage",ifnull(saleDetails.get("Stage"),""));
- create = zoho.crm.create("Sales_to_Campaigns", mp);
- info mp;
- info create;
But its not working, I'm not sure I want to use
zoho.crm.create, I think zoho.crm.update might be what I need to do but I cant seem to associated the Sales record with the created Sales to Campaigns record.
So, How would I update the Sales to Campaigns record? Can I look up records via email? Or is there a way to save the created Sales to Campaigns record Id on the Sales Module and use that?
Any response to this is welcome. my thanks in advance.