Workflow: assign Account to a Deal automatically (Zoho CRM)

07.05.21 12:00 PM By Andy

Part 1: Creating a function

  1. First, create a generic account that can be used for multiple projects (ie: Won Deals)
  2. Open the account you just created and copy the account ID (ie: 44341800000037248888)
  3. In CRM, go to settings, developer space, functions, and add a new function
  4. Name the function (ie: Update_account_in_deal), and select "automation" as the category
  5. Paste the following code in the new window, and make sure to replace the account ID number:
    • update = zoho.crm.updateRecord("Deals",potid,{"Account_Name":4434180000003728888});
  6. Click on "edit arguments", and add "potid" as an "int"
  7. Save everything

Part 2: Creating the workflow

  1. Go to Workflow rules and create a new rule related to the Deals module
  2. Edit the rule: 
    1. When stage is modified to any value
    2. Condition: Stage is Won
    3. Action: function, and select the function you just created
    4. Then map the field "potid" to the Deal ID using the # key
  3. Save everything
Note: edit the rule settings (When, Condition) to match your preferences. In this case we are using the Stage as the trigger, but it can be any field in the Deals module.