Kaizen 215 - Workflow APIs - Part 3

Kaizen 215 - Workflow APIs - Part 3



Welcome back to another week of Kaizen!

Over the last couple of weeks, we’ve joined Zylker Cloud Services as they review and improve their workflows. In Part 1, we discovered and audited their sprawling workflow landscape. In Part 2, we learned how to use the Configuration API to understand valid triggers and actions, preventing errors before they happen.

Now, it is time to take action. Zylker has identified the "VP Alert - High Value Deal" workflow as a prime candidate for an update. It is old, has never run, and its logic might be too narrow. We will also explore how to create a new workflow from scratch to handle a new business requirement.

 STEP 5: Update an Existing Workflow 

From our audit in Step 2, we know that the existing ‘VP Alert - High Value Deal’ workflow (id: 4876876000016390024) hadn’t triggered even once. The original $50,000 threshold missed many valuable deals. Most winning opportunities actually land above $30,000. It has never executed, suggesting the criteria are too strict.

Let us use the Update Workflow Rule API to fix it. We'll change the criteria to trigger for deals greater than or equal to $30,000 and add an additional email notification.

 What you can and cannot update 

When working with the Update Workflow Rule API, not every field in a workflow is open for modification. Think of it like editing an existing automation blueprint. Some foundations are fixed, while others are flexible.

You can update:

  • Name and Description

  • Trigger : You can update triggers, but only within the same trigger type. For example, you can change a Record Action trigger from create to edit, but not from a Record Action trigger to a Score-based trigger. For more details on this, please refer to our detailed help documentation here.

  • Conditions and Criteria : add, remove, or refine them.

  • Actions : add new ones, remove existing ones, or update their configuration.

  • Status : activate or deactivate a workflow rule. 

What cannot be updated

There are a few key restrictions to remember:

  • You cannot change the module associated with the workflow.

  • You cannot switch trigger categories (e.g., from Record Action to Email Trigger).

  • You cannot retain unsupported actions when changing to a trigger that doesn’t support them. For instance, if you change a trigger from Edit to Delete, but keep an Assign Owner action, the update will fail, because “Assign Owner” isn’t valid for Delete triggers.

Updating an existing workflow is not about replacing everything. it is about editing precisely what needs to change.

Here is how to do it:

  • Fetch the workflow details using the Get Workflow Rule API. This gives the full structure,  including condition IDs, action IDs, and trigger details.

  • Identify what needs to change.

In this case, to fix the  “VP Alert - High Value Deal” workflow, we can update the Workflow rule to:

  • lower the threshold to $300,000

  • change the comparator to greater_than. 

To make the workflow more useful, Zylker has also decided to add a few new actions.

But before doing that, the developers needed to confirm which actions are supported for this workflow’s trigger type. That is where last week’s Configuration API comes in handy. Since we already know this is a Record Action trigger (create_or_edit), we can refer to the configuration response we explored in Part 2 to see which actions are valid. 

  {

                "api_name": "create_or_edit",

                "deprecated": false,

                "name": "CreateorEdit",

                "scheduled_actions_supported": true,

                "actions": [

                    "field_updates",

                    "assign_owner",

                    "add_tags",

                    "remove_tags",

                    "email_notifications",

                    "tasks",

                    "create_record",

                    "create_connected_record",

                    "add_meeting",

                    "webhooks",

                    "functions",

                    "circuits",

                    "flow"

                ]

},

 

The response clearly shows that email notifications, field updates, and tags are all supported for this trigger type. With that confidence, in addition to updating the condition, we can also add a 'Priority' tag to those records that trigger the Workflow. This makes the workflow more visible and actionable across the sales hierarchy.

Sample Request:

PUT {{api-domain}}/crm/v8/settings/automation/workflow_rules/4876876000016390024

{

    "workflow_rules": [

        {

            "description": "Notify sales leadership and track strategic opportunities",

            "name": "VP Alert - High Value Deal.",

            "conditions": [

                {

                    "sequence_number": 1,

                    "criteria_details": {

                        "criteria": {

                            "group_operator": "AND",

                            "group": [

                                {

                                    "comparator": "greater_than", // change in comparator operator

                                    "field": {

                                        "api_name": "Amount"

                                    },

                                    "value": "300000"   // Lowered threshold

                                },

                                {

                                    "comparator": "equal",

                                    "field": {

                                        "api_name": "Stage"

                                    },

                                    "value": "Negotiation/Review"

                                }

                            ]

                        }

                    },

                    "instant_actions": {

                        "actions": [

                            {

                                "type": "add_tags",

                                "module": "Deals",

                                "details": {

                                    "tags": [

                                        {

                                            "name": "Priority"

                                        }

                                    ],

                                    "overwrite": true

                                }

                            }

                        ]

                    },

                    "id": "4876876000016390025" // id of the condition to be updated

                }

            ]

        }

    ]

}

 

After this update, the workflow now triggers for any deal worth more than $300,000 in the Negotiation/Review stage. Apart from sending the email notifications and adding the follow up task, it also tags these deals as Priority.

 Edit vs Add: 

To edit an existing condition or action, include its existing id in your update payload. Zoho CRM will recognize it as an update to that object.

To add a new condition or action, simply omit the id. CRM treats any object without an ID as a new addition.

 STEP 6: Create a new Workflow Rule 

With the VP Alert - High Value Deal workflow now fixed and performing as expected, Zylker’s sales team quickly began to see results.
But their sales team noticed that deals often stall after proposals are sent, with no systematic follow-up. Zylker has hence refined the requirements for a new Workflow.

They want to automatically trigger follow-up actions when a high-value deal (above ₹30,000) is marked “Closed Lost” due to pricing reasons. This workflow must ensure that every lost opportunity is reviewed, tagged, and re-engaged after a cooling-off period. To achieve this, they want to create a workflow to be triggered whenever a deal’s Stage is updated to Closed Lost. It must perform the following actions:

  • Add tags Lost due to Pricing and Re-engagement Pending.

  • Send an email alert to the Sales team, with the details of the failed Deal, so they can look into the reasons.

  • After 30 business days, automatically create another “Lost Deal - Feedback” task to remind the owner to re-contact the customer for feedback, and for future opportunities. 

Before proceeding, Zylker makes an API call to the Workflow Configuration endpoint. This ensures that their chosen trigger type and actions are supported. From the response snippet below, it is clear that a field_update trigger supports scheduled actions and the required action types.

  {

                "api_name": "field_update",

                "deprecated": false,

                "name": "FieldUpdate",

                "scheduled_actions_supported": true,

                "actions": [

                    "field_updates",

                    "assign_owner",

                    "add_tags",

                    "remove_tags",

                    "email_notifications",

                    "tasks",

                    "create_record",

                    "create_connected_record",

                    "add_meeting",

                    "webhooks",

                    "functions",

                    "circuits",

                    "flow"

                ]

}

 

With these details validated, we can now move on to adding a new workflow for Zylker using the Create Workflow Rule API request.

Understanding the input JSON structure 

Every workflow definition follows the same hierarchy - defining when the rule runs, what conditions it checks, and which actions it performs.

The top-level input object contains a workflow_rules array. You must include just one workflow rule object per request. Each workflow rule defines its name, trigger type, and one or more condition blocks, each with its own criteria and actions.

Here is a breakdown of what is inside a single workflow rule:

{

  "workflow_rules": [

    {

      "name": "VP Alert - High Value Deal.",   //name of the workflow rule

      "description": "Notify leadership when high-value deals are lost due to pricing.",

      "module": { "api_name": "Deals" },   //module to which the workflow applies

      "execute_when": { ... },         //trigger configuration (e.g., on record edit, field update, etc.)

      "conditions": [

        {

          "sequence_number": 1,          // order of execution. this is the first condition

          "criteria_details": { ... },           // condition logic (criteria group)

          "instant_actions": { "actions": [ ... ] },  //instant actions executed instantly

          cheduled_actions": [              // schedules actions executed after a delay

            {

                      "execute_after": { ... },              // delay period for the scheduled action

                        "actions": [ ... ]

            }

          ]

        },

        {

          "sequence_number": 2,                      // second condition

          "criteria_details": { ... },

          "instant_actions": { "actions": [ ... ] }

        }

      ]

    }

  ]

}




Associative vs. Non-Associative Actions 

Every workflow rule performs one or more actions like sending an email, creating a task, or updating a field, etc. These actions fall into two broad categories: associative and non-associative.

Type

Description

Example Actions

Non- Associative Actions

These are defined inside the workflow rule itself. They do not need to exist beforehand. You can configure their details directly within the workflow payload.

Create record, schedule a call, add a meeting, convert records, social actions, create record on email received, assign owner,

Associative Actions

These are reusable actions created separately in CRM and referenced by their IDs. They can be used across multiple workflows and other automation tools.

Field updates, Email notifications, tasks, Webhooks, Add/Remove tags

 

When you create or update a workflow via API, the associative actions require you to pass their existing action IDs. These IDs can be fetched using the corresponding Actions APIs : Field Updates, Email Notifications, Webhooks, and Tasks. In the coming weeks of Kaizen, we will take a closer look at each of these Actions APIs. We will see how to create, manage, and delete them within your workflow automation strategy.

Sample Request:

POST {{api-domain}}/crm/v8/settings/automation/workflow_rules

{

    "workflow_rules": [

        {

            "execute_when": {

                "details": {

                    "trigger_module": {

                        "api_name": "Deals",

                        "id": "4876876000000002181"

                    },

                    "criteria": {

                        "comparator": "equal",

                        "field": {

                            "api_name": "Stage",

                            "id": "4876876000000002565"

                        },

                        "type": "value",

                        "value": "Closed Lost"

                    },

                    "repeat": false,

                    "match_all": false

                },

                "type": "field_update"

            },

            "module": {

                "api_name": "Deals",

                "id": "4876876000000002181"

            },

            "description": "Triggers tasks, tags, and follow-up reminders for high-value deals lost due to pricing",

            "name": "Lost Deal due to Pricing - Follow Up",

            "conditions": [

                {

                    "sequence_number": 1,

                    "instant_actions": {

                        "actions": [

                            {

                                "name": "Lost Deal - Feedback",

                                "id": "4876876000016794047",

                                "type": "tasks"

                            },

                            {

                                "details": {

                                    "module": {

                                        "api_name": "Deals",

                                        "id": "4876876000000002181"

                                    },

                                    "over_write": false,

                                    "tags": [

                                        {

                                            "name": "Lost due to Pricing",

                                            "id": "4876876000016794071",

                                            "color_code": "#658BA8"

                                        },

                                        {

                                            "name": "Re-engagement pending",

                                            "id": "4876876000016794075",

                                            "color_code": "#879BFC"

                                        }

                                    ]

                                },

                                "type": "add_tags"

                            },

                            {

                                "name": "Deal Lost Alert",

                                "id": "4876876000016794062",

                                "type": "email_notifications"

                            }

                        ]

                    },

                    "scheduled_actions": [

                        {

                            "execute_after": {

                                "period": "business_days",

                                "unit": 30

                            },

                            "actions": [

                                {

                                    "name": "Lost Deal - Feedback",

                                    "id": "4876876000016794047",

                                    "type": "tasks"

                                }

                            ]

                        }

                    ],

                    "criteria_details": {

                        "criteria": {

                            "group_operator": "AND",

                            "group": [

                                {

                                    "comparator": "greater_equal",

                                    "field": {

                                        "api_name": "Amount",

                                        "id": "4876876000000002557"

                                    },

                                    "type": "value",

                                    "value": "30000"

                                },

                                {

                                    "comparator": "equal",

                                    "field": {

                                        "api_name": "Reason_For_Loss__s",

                                        "id": "4876876000002440001"

                                    },

                                    "type": "value",

                                    "value": "Price"

                                }

                            ]

                        }

                    }

                }

            ]

        }

    ]

}

 

The execute_when defines when the workflow should fire.

  • type = field_update means this rule runs when a field’s value changes.

  • criteria : Stage = Closed Lost so the rule triggers whenever the Stage field is updated to Closed Lost.

  • repeat = false ensures it will not trigger multiple times for the same record. 

In simple terms: “Whenever a deal is marked as Closed Lost, run this workflow.” The criteria_details section refines the trigger. The workflow only runs when the Amount ≥ ₹30,000 AND Reason for Loss = Price.

The instant_actions section inside the conditions array has the actions to be executed immediately when the criteria are met.

  • Add Tags : labels the record for easy filtering and reporting.

  • Send Email Alert : notifies the sales team instantly about the lost deal.

The scheduled_actions defines what happens after some time has passed. In this case, after 30 business days. Here, the workflow automatically creates a “Lost Deal - Feedback” task, reminding the deal owner to follow up with the customer to get feedback, and for future opportunities.

The criteria_details defines which records the workflow applies to. In this case, the rule applies to the records that satisfy the following conditions:
  1. The Amount is greater than or equal to ₹30,000, and  

  2. The Reason for Loss is “Price.”  

By combining these elements, this workflow achieves a full closed-loop follow-up system.

Conclusion:  

Zylker’s updated and new workflows make their automation smarter and more responsive. They are now able to spot key deals and ensure lost opportunities are revisited.  

And this is just the beginning. There are countless use cases you can build with workflows. We have included many examples in our Postman collection. Please check them out to get more out of the Workflow APIs. If you have a unique scenario you would like us to address, or a specific automation challenge you are facing, please let us know! We will address them in the upcoming weeks.


We hope you are now well on your way to mastering Workflow APIs. Share your thoughts in the comments or write to us at support@zohocrm.com.

Additional Reading:

  1. Workflow APIs - Part 1 - Auditing Workflows
  2. Workflow APIs - Part 2 - Find out what actions and triggers are supported for each module


    • Recent Topics

    • How do you print a refund check to customer?

      Maybe this is a dumb question, but how does anyone print a refund check to a customer? We cant find anywhere to either just print a check and pick a customer, or where to do so from a credit note.
    • Enable Screen Recording in Zoho WorkDrive Mobile Apps (Android & iOS)

      Hi Zoho WorkDrive Team, How are you? We are enthusiastic Zoho One users and rely heavily on Zoho WorkDrive for internal collaboration and content sharing. The screen-recording feature in the WorkDrive web app (similar to Loom) is extremely useful- however,
    • What is Resolution Time in Business Hours

      HI, What is the formula used to find the total time spent by an agent on a particular ticket? How is Resolution Time in Business Hours calculated in Zohodesk? As we need to find out the time spent on the ticket's solution by an agent we seek your assistance
    • Hide "Section" headers when using a form as a subform in "List view"

      When using a form as a subform and setting the "View Type" to "List View" it is not possible to hide the section headers. This can become an issue if I have a section which is not applicable to this subform and I hide the fields within that section and
    • Add additional field to quick search results

      IN the advanced search, we can add any field to the columns. In the regular search results (before you press enter, there is no option to modify the results. It would be super useful to include a custom field where it currently displays the pipleine
    • Books API Receiving an Error that Doesn't Make Sense when Creating Credit Note - trying to use 'ignore_auto_number_generation' argument

      Hello, I'm working on a newly created routine and I'm getting an error that doesn't make sense when trying to create a new Credit Note. Here is my POST request. Endpoint: https://www.zohoapis.com/books/v3/creditnotes?organization_id=########## Body:     {
    • Bug Report and Suggestions for Improvement in Zoho Applications

      Hi Zoho Team, I’d like to report a few bugs and improvement suggestions I’ve noticed while using Zoho products: Zoho Cliq Video Call: The camera sometimes turns off automatically during video calls. This seems to be a bug — please check and fix it. Zoho
    • Need Help: Updating Related Records via Subform Entries in Zoho Creator

      Hi everyone, I’m trying to set up a workflow in Zoho Creator where each row in a subform updates related records in another form automatically. Here’s the situation: My main form (e.g., “Receipts”) contains a subform where each row selects a related record
    • Zoho Desk - Community - Customer Portal - Description Field UX Improvement

      Hi Zoho Desk Team, As a prolific user of Zoho Cares Community, I find it very frustrating that I cannot increase the size of the Description box (this one which I am typing this message). Many apps with multi line text fields have a small handle in the
    • Add the same FROM email to multiple department

      Hi, We have several agents who work with multiple departments and we'd like to be able to select their names on the FROM field (sender), but apparently it's not possible to add a FROM address to multiple departments. Is there any way around this? Thanks.
    • Can I change the format of the buttons in the email templates?

      Hi all! We have been working hard trying to brand our email templates, and have some way to go yet. One of the things we can't seem to edit is the green ${Cases.CUSTOMER_PORTAL_BUTTON} button and the font of the View Ticket text. Is there any way of doing
    • Introducing parent-child ticketing in Zoho Desk [Early access]

      Hello Zoho Desk users! We have introduced the parent-child ticketing system to help customer service teams ensure efficient resolution of issues involving multiple, related tickets. You can now combine repetitive and interconnected tickets into parent-child
    • Zero Personalization of the File Sharing Experience

      By now (2025) this is the maximum level of personalization available for a Zoho sharing link. We gently asked Zoho if we could modify at least the background, and they replied that it cannot be customized. We're truly disappointed – and surprised every
    • Lead to Contact Conversion with multiple email address fields

      We are a B2C business with a strong repeat cycle, and as such it's not uncommon for customers to use multiple email addresses with us. We have both our Contacts & Leads modules set up with 3 email fields. (Primary Email / Secondary Email / Historic Email)
    • Introducing Dark Mode / Light Mode : A New Look For Your CRM

      Hello Users, We are excited to announce a highly anticipated feature - the launch of Day, Night and Auto Mode implementation in Zoho CRM's NextGen user interface! This feature is designed to provide a visually appealing and comfortable experience for
    • Does Thrive work with Zoho Billing (Subscriptions)?

      I would like to use Thrive with Zoho Billing Subscriptions but don't see a way to do so. Can someone point me in the right direction? Thank you
    • How to display two measures (sales and price) divided by categories on one line chart

      Hi everyone, I’m having trouble figuring out how to display two columns on a line chart with category breakdowns. What I need is a line chart where one line represents Sales and the other represents Price. However, the Price data is divided into around
    • Exporting Charts from ZohoCRM

      Hi...I'm relatively new to ZohoCRM, but very happy with it so far. I have all my leads and potentials accurately entered, and like the reports that I can view, with charts at the top of the data. But when I export the data, I'm receiving only the data, whether I export as excel, csv or pdf. How can I export both the chart and the data? In case it makes a difference, I'm using the free version right now. I tried researching the other editions to see if a paid version of the software offered the ability
    • Automatically Update Ticket Status in Zoho Desk Based on Actions in Zoho Projects

      Hi Zoho Desk Team, Hope you’re doing well. We’re using the Zoho Desk–Zoho Projects integration to manage tasks related to customer tickets, and it works well for linking and tracking progress. However, there are a few important automation capabilities
    • sms long credits

      I’m trying to purchase Long Code credits so I can send SMS campaigns to my contacts. However, when I click the “Buy Now” button, the page appears blank and doesn’t load any purchase options. Could you please assist me in purchasing the Long Code credits
    • Tip #48- Power Your AI Workflows with Zoho Assist on Zapier’s MCP- 'Insider Insights'

      We’re thrilled to announce that Zoho Assist is now part of Zapier’s Model Context Protocol (MCP), bringing remote support automation right into your AI ecosystem. What is MCP? The Model Context Protocol (MCP) is Zapier’s new framework designed to connect
    • Insert Cookie Policy in Zoho Sites

      Hello, i need to insert a banner on my site because i'm in Italy so i have to respect EU laws for Cookie Policy and Privacy Policy. I see that i need to insert a code in <head> section of my site to show a banner/popup with cookie info. How i can do this? Thank you Luca
    • Marketing Tip #1: Optimize item titles for SEO

      Your item title is the first thing both Google and shoppers notice. Instead of a generic “Leather Bag,” go for something detailed like “Handcrafted Leather Laptop Bag – Durable & Stylish.” This helps your items rank better in search results and instantly
    • Customer Parent Account or Sub-Customer Account

      Some of clients as they have 50 to 300 branches, they required separate account statement with outlet name and number; which means we have to open new account for each branch individually. However, the main issue is that, when they make a payment, they
    • Forced Logouts - Daily and More Frequent

      In the last month or so, I've been getting "power logged out" of all of my Zoho apps at least daily, sometimes more frequently. This happens in the same browser session on the same computer, and I need to re-login to each app separately after this happens.
    • Paste issues in ZOHO crm notes

      Hi, since a week or so I have issues with the paste function in ZOHO CRM. I use "notes" to copy paste texts from Outlook emails and since a week or so, the pasting doesnt function as it should: some text just disappears and it gives a lot of empty lines/enters.....
    • ENTER key triggering Submit

      Is it possible to stopped the ENTER key from the mandatory triggering of the Submit button on Creator form? I want forms submitted "ONLY" when the Submit button is pressed. 
    • Is it possible to assign Client user to external task ON PROJECTS' TEMPLATES?

      Is it possible to assign Client user to external task ON TEMPLATES PROJECTS?
    • Draft & Schedule Emails Directly in Bigin

      Greetings, I hope all of you are doing well. We're happy to announce a few recent enhancements we've made to email in Bigin. We'll go over each one in detail, but here's a quick overview: Previously, you couldn't draft or schedule emails in Bigin, but
    • Zoho CRM Workflow and Function Backup Options

      Hi everyone! I have been able to make several backups of my CRM data and noticed that the Workflows and Functions are not included in these backups. To my knowledge, there is no backup feature for workflows and functions, which is problematic in of itself.
    • Cliq does not sync messages after Sleep on Mac

      I'm using the mac app of Cliq. When I open my mac after it was in sleep mode, Cliq does not sync the messages that I received. I always have to reload using cmd + R, which is not what I want when using a chat application.
    • Link to images

      I have added images in pages. I would like to link those images with linked in URL so that they open in new window. There is an option of image -> link but I am not able to use the same to open URL in new window. Please check the attached image. Can you
    • Canvas View - Print

      What is the best way to accomplish a print to PDF of the canvas view?
    • What's New in Zoho Analytics - October 2025

      Hello Users! We're are back with a fresh set of updates and enhancements to make data analysis faster and more insightful. Take a quick look at what’s new and see how these updates can power up your reports and dashboards. Explore What's New! Extreme
    • Respond faster and smarter with Zia in your IM Inbox

      You’re in the middle of a busy chat queue. New messages keep popping up. One customer sounds upset. Another is asking a long list of questions. You need context. You need speed. You need help. That’s exactly when Zia Insghts jumps into action. It shows
    • Meeting impossible to use when sharing screen

      he Meeting tool in Brazil is practically unusable when sharing anything, whether it’s a presentation or simple navigation. When accessed via Cliq, the situation gets even worse: even basic calls fail to work properly, constantly freezing. And as you are
    • Let's Talk Recruit: Meet Zia, your all-in-one AI assistant (Part-2)

      Welcome back to Let’s Talk Recruit series. In Part 1, we introduced Zia and how AI is reshaping the way recruiters work. This time, we’re taking a closer look at how far Zia has come and how each update continues to simplify your everyday tasks. When
    • WARNING : Smart list automatically unsubscribes your contacts.

      I created a smart list of my team members based on the criterion that their email domain was @_____. The list refreshed as expected — but it ended up unsubscribing almost all members of my team. I contacted support, but it took two months to get a reply,
    • Export Purchase orders as Excel

      Is it possible to export purchase orders as excel rather than PDF? Our suppliers don't want orders made in PDF, they need it to be excel
    • 5名限定 課題解決型ワークショップイベント Zoho ワークアウト開催のお知らせ (10/31)

      ユーザーの皆さま、こんにちは。Zoho ユーザーコミュニティチームの中野です。 10月開催のZoho ワークアウトについてお知らせします。 今回はZoomにて、オンライン開催します。 参加登録はこちら(無料):https://us02web.zoom.us/meeting/register/BGYTysOnSqa9LA9eY2IKww ━━━━━━━━━━━━━━━━━━━━━━━━ Zoho ワークアウトとは? Zoho ユーザー同士で交流しながら、サービスに関する疑問や不明点の解消を目的とした
    • Next Page