Kaizen 128 - Circuits in Zoho CRM - Part 3

Kaizen 128 - Circuits in Zoho CRM - Part 3

Hello everyone!
We are back with yet another post on Circuits in Zoho CRM.

In our last week's post, we discussed a use case, the various states and functions involved in that circuit, testing and execution, and associating that circuit with a workflow.

In today's post, we will see how we can associate that circuit with a button and a blueprint, the output format of the "Zoho CRM" functional states, and a few FAQs.

Use case recap

Consider that we have a module in CRM called Customers, where we have personal info of customers, tax-related details, tax and personal ID verification details and status. Our aim is to check the loan amount, check eligibility, and then grant or reject it.
Our condition is that whenever the loan amount is less than Rs. 500,000, the circuit should directly proceed to document verification. When the requested loan amount is greater than Rs. 500,000, we must check a few eligibility criteria before proceeding to document verification.

This is the circuit for the above use case.


Let us see how this circuit works with a button.

Associating the Circuit with a Button

Follow the steps in this article to create a button in the Customers module.
Choose "Execute Circuit" from the list of Custom Actions for the button.
From the list of Circuits, choose the Verification Process circuit.


Here is the execution of the circuit when you execute the button action.


Associating the Circuit with a Blueprint

Create a blueprint by following the steps in this article.
Our blueprint would look like this.

Specify the entry criteria as Amount > 500000.
When the amount > 500000, and tax is filed, the "After" transition would be executing the circuit as shown in the image.

When the tax is not filed, the "After" transition will still be executing the circuit.




Execution Logs

Go to Setup > Developer Hub > Circuits.
Click the Execution Logs tab. You can see the list of circuits that were executed with their duration, start and end times, the place where they were triggered from, and the status.


When you click any of the entries, you can see the execution of the circuit.

If a circuit's execution failed, the status would be Failed.
When you hover over the entry, you can see Retry and Rerun options.

Retry executes the circuit from the state where it failed, while Rerun executes the circuit from the beginning.

Output format of the "Zoho CRM" Functional States

After the input is processed by the state, the output will be available as a JSON. Result Path selects(using JSON Path format) what combination of the state result and the actual state input has to be passed to the output, from that JSON.
Each JSON of the Zoho CRM state will have two objects viz., ZohoCRM and the variable you have specified in the Result Path for that state(depicted in the following image).

Here is the JSON.
{
"ZohoCRM": {
"record_id": "{recordid}",
"user_id": "{userid}",
"module": {
"api_name": "{moduleapiname}",
"tab_label": "{modulelabel}",
"id": "{moduleid}"
}
    },
  "{name}": {} //contains state result
}

The various Zoho CRM states and their sample JSON formats in the response are discussed in this section. 
  1. The Get User state returns the Get user API response.
  2. The Get Variables state returns the CRM variables in your org.
  3. The Get Org state returns the org details.
  4. The Get Record state returns the record's details.

1. Get User

{
 "ZohoCRM": {
  "record_id": "5575270000005762031",
  "user_id": "5575270000005379053",
  "module": {
   "api_name": "Customers",
   "tab_label": "Customers",
   "id": "5575270000001975002"
  }
 },
 "get_user": {//This is the name specified for the Result Path
  "users": [
   {.. Get a user API response.. }
]
}
}

2. Get Variables

{
 "ZohoCRM": {
  "record_id": "5575270000005762031",
  "user_id": "5575270000005379053",
  "module": {
   "api_name": "Customers",
   "tab_label": "Customers",
   "id": "5575270000001975002"
  }
 },
 "get_var": {//This is the name specified for the Result Path
  "variables": [
   {.. Get Variables API response.. }
]
}
}

3. Get Org

{
 "ZohoCRM": {
  "record_id": "5575270000005762031",
  "user_id": "5575270000005379053",
  "module": {
   "api_name": "Customers",
   "tab_label": "Customers",
   "id": "5575270000001975002"
  }
 },
 "get_org": {//This is the name specified for the Result Path
  "org": [
   {.. Get Organization API response.. }
]
}
}

4. Get Record

{
 "ZohoCRM": {
  "record_id": "5575270000005762031",
  "user_id": "5575270000005379053",
  "module": {
   "api_name": "Customers",
   "tab_label": "Customers",
   "id": "5575270000001975002"
  }
 },
 "record": {//This is the name specified for the Result Path
  "data": [
   {.. Get records API response.. }
]
}
}


The following table gives you an idea of how the response for the Get record state is depending on where the circuit is triggered from.

Trigger
Applicable?
Output
Workflow
Yes
data[0] (Respective record)
Blueprint
Yes
data[0]
Button - Details Page
Yes
data[0]
Button - Edit Page
Yes, but the current edited value won't be considered
data[0]
Button - Each Record
Yes
data[0]
Button - Mass Action
Yes, the Execution preview will be redirected to the Circuit's Execution tab
data[0]
Button - Related List Selection*
The related module's record, not the base module's record
data[0]
Button - Create Page
No
{}
Button - Clone Page
No
{}
Button - Utility Menu
No
The circuit fails because `record_ids` will be passed as an array instead of `record_id`

FAQs

1. Is it possible to trigger a Circuit via a REST API?
It is not possible to trigger/execute a Circuit via REST API as of now. We have plans to support that in the future.

2. How to pass record details/Is it possible to send parameter values to a Circuit while starting the execution?
You can simply use the "Get Record" state to get the details of a record, and the response will be the same as that of the Get Records API.

3. What API version is 'Get Record' using?
Version 2 of CRM APIs.

4. Is it possible to return JSON as a response from the Function state?
Yes. To send a custom JSON response, you should use `crmAPIRequest` as the key and the value as the API response in Functions.
Example:

// This is the actual content you will get in the Circuit.
output = {"name":"Zylker","zipcode":600001};
// This is to construct the crmAPIResponse
response = Map();
response.put("status_code",200);
response.put("body",{"code":"success","details":{"output":output,"output_type":"string","id":"896753000000146001"},"message":"function executed successfully"});
return {"crmAPIResponse": response};

5. Is it possible to pause the circuit and continue to the next state on demand/on trigger from a remote server (via REST API)?
It's not possible to pause the state and trigger the next state from a remote server. As a workaround, you can use the "wait" state (up to 30 days i.e 25,92,000 seconds) is and fetch the status periodically to move to the next state upon the desired response received.

6. Is it possible to retry Circuit execution from the failed state?
Yes, one can retry the Circuit execution from the last failed state or can rerun the entire execution from the beginning. These options are available for every Failed execution under the Execution Logs.

7. How are credits calculated for a Circuit?
Circuits use an edition-based credit system, where each transition in the circuit consumes one credit. While every edition has a maximum credit limit, you can always purchase add-on credits from the Credits tab on the Circuits dashboard. Refer to this help page for details.

We hope you found this post useful. Let us know your comments in the Comment section.

Cheers!
Shylaja

Additional Reading:


    Access your files securely from anywhere







                        Zoho Developer Community





                                              Use cases

                                              Make the most of Zoho Desk with the use cases.

                                               
                                                

                                              eBooks

                                              Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                               
                                                

                                              Videos

                                              Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                               
                                                

                                              Webinar

                                              Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                               
                                                
                                              • Desk Community Learning Series


                                              • Meetups


                                              • Ask the Experts


                                              • Kbase


                                              • Resources


                                              • Glossary


                                              • Desk Marketplace


                                              • MVP Corner


                                                        • Sticky Posts

                                                        • Kaizen #197: Frequently Asked Questions on GraphQL APIs

                                                          🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                        • Celebrating 200 posts of Kaizen! Share your ideas for the milestone post

                                                          Hello Developers, We launched the Kaizen series in 2019 to share helpful content to support your Zoho CRM development journey. Staying true to its spirit—Kaizen Series: Continuous Improvement for Developer Experience—we've shared everything from FAQs
                                                        • Kaizen #193: Creating different fields in Zoho CRM through API

                                                          🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                        • Client Script | Update - Introducing Commands in Client Script!

                                                          Have you ever wished you could trigger Client Script from contexts other than just the supported pages and events? Have you ever wanted to leverage the advantage of Client Script at your finger tip? Discover the power of Client Script - Commands! Commands
                                                        • Kaizen #165 : How to call Zoho CRM APIs using Client Script

                                                          Welcome back to another exciting Client Script post! In this post, we will discuss one of the most frequently asked questions: How do you call Zoho CRM APIs from Client Scripts? In this kaizen post, 1. Ways to make calls to Zoho CRM APIs using Client


                                                        Manage your brands on social media



                                                              Zoho TeamInbox Resources



                                                                  Zoho CRM Plus Resources

                                                                    Zoho Books Resources


                                                                      Zoho Subscriptions Resources

                                                                        Zoho Projects Resources


                                                                          Zoho Sprints Resources


                                                                            Qntrl Resources


                                                                              Zoho Creator Resources



                                                                                  Zoho CRM Resources

                                                                                  • CRM Community Learning Series

                                                                                    CRM Community Learning Series


                                                                                  • Kaizen

                                                                                    Kaizen

                                                                                  • Functions

                                                                                    Functions

                                                                                  • Meetups

                                                                                    Meetups

                                                                                  • Kbase

                                                                                    Kbase

                                                                                  • Resources

                                                                                    Resources

                                                                                  • Digest

                                                                                    Digest

                                                                                  • CRM Marketplace

                                                                                    CRM Marketplace

                                                                                  • MVP Corner

                                                                                    MVP Corner







                                                                                      Design. Discuss. Deliver.

                                                                                      Create visually engaging stories with Zoho Show.

                                                                                      Get Started Now


                                                                                        Zoho Show Resources


                                                                                          Zoho Writer Writer

                                                                                          Get Started. Write Away!

                                                                                          Writer is a powerful online word processor, designed for collaborative work.

                                                                                            Zoho CRM コンテンツ






                                                                                              Nederlandse Hulpbronnen


                                                                                                  ご検討中の方




                                                                                                        • Recent Topics

                                                                                                        • How to set Sales Order Payment Terms when creating a Sales Order via the Zoho Books API

                                                                                                          I am creating Sales Orders via the Zoho Books API. I would like to set the Payment Terms to a particular value from the list of allowed values. Is that possible? I was able to get the list of payment terms via this API call: https://books.zoho.com/api/v3/settings/paymentterms?organization_id=XXXX"
                                                                                                        • Function and workflow to create customer payment and send receipt

                                                                                                           I am attempting to set up a workflow/custom function for the automatic creation of a customer payment and sending the email receipt, but am receiving the error "Improper Statement Error might be due to missing ';' at end of the line or incomplete expression" I've been over everything several times and cannot see where the error is (code is copied into the attached document).  I haven't used custom functions before with Deluge, so it's very likely something very simple, or I've completely mucked
                                                                                                        • How to rename the Submit Button by using deluge script

                                                                                                          Hi everyone, As we know, the Submit button can be renamed in the form builder setting. But I have scenario where I need the Submit Button to be renamed differently according to condition. Anyone knows how to do it? Thank You
                                                                                                        • ADDDATE formula using 2 calculations

                                                                                                          Hello, I want to create an ADDDATE formula using 2 calculations, add 1 month and deduct 1 day. the formula that I need should look like this: ADDDATE(due_date, 1, "Months")+ ADDDATE(due_date, -1, "Days") Each row itself works fine, but when I'm trying
                                                                                                        • Banking: Transfer from another account without base currency

                                                                                                          Scenario: A banking line item shall be categorised as an "internal transfer" from another bank account. This is a USD to EUR transfer. Our base currency is CHF. What we tried: Category: "Transfer from another account" From: Our USD account To: Our EUR
                                                                                                        • Item cost price - How to accomodate changing cost prices

                                                                                                          I am in urgent need of assistance with how to accommodate changing cost prices for items, not manually. We import items so their landed cost is always changing. This cost is NOT reflected however in the item cost price. This is going to cause us some
                                                                                                        • Bigin merge field in email template for subject line to match lead name

                                                                                                          Hello We Are using email in to automatically create leads in our pipelines. When we want to reply from conversations, and apply an email template, it’s not matching the original subject line. It should be lead name to match. But it’s not working. Even
                                                                                                        • GraphQL in new Send Webhooks feature

                                                                                                          Hello, is it possible to use GraphQL apis in the new Send Webhooks feature?
                                                                                                        • Marketer's Space: Targeted messaging : Leveraging Zoho Campaigns for Effective Communication

                                                                                                          Hello Marketers, Welcome back to Marketers’ Space! Targeted messaging ensures your communication reaches the right audience - boosting engagement, conversions, and overall campaign success. In this post, we’ll be looking at targeted messaging to create
                                                                                                        • Assignment Thresholds Resetting After Lead Conversion

                                                                                                          Hello everyone, We're facing an issue with Zoho CRM's lead assignment thresholds that makes them unsuitable for our workflow. I'm hoping to find a potential workaround or solution from the community. Here’s our current process: A new lead is created automatically
                                                                                                        • :between: conditions in search?criteria

                                                                                                          Hello, please help solve problem I try to select deals by Creater_Time between dates i send this GET request /crm/v4/deals/search?criteria=(Created_Time:between:(2024-02-01T18:52:56,24-02-17T18:52:56)) encoded to /crm/v4/deals/search?criteria=%28Created_Time%3Abetween%3A%282024-02-01T18%3A52%3A56%2C24-02-17T18%3A52%3A56%29%29
                                                                                                        • Zoho Creator : Updating Records via Import. Can't use Autonumber or ZohoRecordID ?

                                                                                                          Hi, I am trying to use the function to update a report with an import. I'm running in to the error : "unable to update because the form has no column with unique values" In the release notes it says Only field with unique values can be used to compare
                                                                                                        • 💡 Feature Request: Custom App Bundle Plan (Pick Only the Apps You Need)

                                                                                                          Request: Allow Users to Build a Custom App Bundle (Choose Only the Apps They Need) Hi Zoho Team, I appreciate the value that Zoho One and the Plus Bundles (CRM Plus, Finance Plus, etc.) offer. However, I’m finding it difficult to get the best fit for
                                                                                                        • Search Feature Now Broken

                                                                                                          I have many hundreds of notes on Zoho Notebook but now when I search for a keyword, I only get 30 results maximum. This is unacceptable and yet another feature that has become broken on this quickly deteriorating software. Please fix immediately.
                                                                                                        • Restrict Zoho One Account Notifications to Admins

                                                                                                          Hi Zoho One Team, I hope you're doing well. We recently noticed that end users are receiving administrative pop-ups in Zoho One, such as the DKIM configuration notice (screenshot attached). This type of notification is only relevant to administrators
                                                                                                        • Zoho CRM Account Duplication via Credit Application Form

                                                                                                          Hi, We send a credit application link to our customers via email, which is managed through Zoho Campaigns. When a customer submits the form, it automatically creates a new account in Zoho CRM. We would like to know how to stop this from creating duplicate
                                                                                                        • Experience effortless record management in CRM For Everyone with the all-new Grid View!

                                                                                                          Hello Everyone, Hope you are well! As part of our ongoing series of feature announcements for Zoho CRM For Everyone, we’re excited to bring you another type of module view : Grid View. In addition to Kanban view, List view, Canvas view, Chart view and
                                                                                                        • Client Script also planned for Zoho Desk?

                                                                                                          Hello there, I modified something in Zoho CRM the other day and was amazed at the possibilities offered by the "Client Script" feature in conjunction with the ZDK. You can lock any fields on the screen, edit them, you can react to various events (field
                                                                                                        • Automated Checkout

                                                                                                          Hi Team, I’m trying to create an automated checkout function in Zoho People. My requirement is that if an employee forgets to check out, the system should automatically check them out after 10 hours. However, I'm encountering an error while updating the
                                                                                                        • Zoho CRM Community Digest - June | Part 1

                                                                                                          CRM FOMO is real. You could be doing everything right and still miss the beat. That’s where we come in. Zoho CRM Community Digest! Every two weeks, we bring you the insider scoop on all things CRM: brand-new features, time-saving tips, clever workarounds,
                                                                                                        • Introducing Video Tutorials for the Zoho FSM Mobile App

                                                                                                          We’re excited to announce the launch of our brand-new video tutorials for the Zoho FSM Mobile App—designed painstakingly to help your field agents get up to speed in no time! Whether you're brand new to the Zoho FSM mobile app or just need a quick refresher,
                                                                                                        • Zoho People > Managed People > User Access Control

                                                                                                          Hello All I need your recommendation on how should i go about setting the User Access Control in my Zoho People
                                                                                                        • Zoho People > Performance Management > Appraisal cycle

                                                                                                          Hello All I am using this 2 users to test out how it work on Performance Management User 1 - Reportee User 2 - Reporting Manager : Li Ting Haley User 1 : Self Appraisal Error How do i fix this error?
                                                                                                        • View List of Bot Subscribers in Zoho Cliq Interface

                                                                                                          Hi Zoho Cliq Team, Hope you're doing well. We’d like to submit a feature request related to bot management in Zoho Cliq. Currently, while we can see the total number of subscribers for each bot, there is no way to view who has subscribed via the Cliq
                                                                                                        • Comment Reactions like a Thumbs Up

                                                                                                          Can we please have the ability to emoji react on comments or at the very least, thumbs a comment up? Literally every other project management system out there can support this and it is very much needed to just acknowledge a comment instead of completely
                                                                                                        • What happened to the tabs in the ribbon on the top in my CRM?

                                                                                                          Hi, This morning all of the tabs (modules) in the ribbon on top are no longer showing up. I had the modules in the ribbon in a specific order for easy, one-click access. Now it's only showing the active tab and the rest are hiding under the three dots
                                                                                                        • Connect to Australian bank

                                                                                                          How do I connect to an Australian bank. No Australian bank shows up in my list. I think its because the service provider is Token and not Yodlee. How do I change this?
                                                                                                        • Struggled with Office 365 Migration? Here's What Helped Me!

                                                                                                          I recently faced a serious challenge migrating data from one Office 365 tenant to another. If you’ve tried a tenant to tenant migration, you probably know how tricky it can get—especially with native methods that only support mailbox and OneDrive migration.
                                                                                                        • Workflow on Clone

                                                                                                          Hello. I'm interested on creating a workflow on a clone of a record in the Price_Books module that will clone also all the related Products and associate the new ones with the new Price_Book. My problem starts with that there's no On Clone event, only
                                                                                                        • Disabling Smart Writing Assistant

                                                                                                          Hello, I've found this article when looking to disable the Zoho Smart Writing Assistant in our Zoho Desk environment. I appreciate that the article is for another Zoho solution, however, I was still unable to disable this feature! Could we please have
                                                                                                        • Zoho People > Access of Left Menu

                                                                                                          Hello All May I check how do i activate or de-activate of the left menu for users do i control via role or specific role? I have assign a user to Team member
                                                                                                        • Searching for content within courses

                                                                                                          Hello, I have been testing out Zoho One for my company have been exploring Learn. I've noticed that you cannot search for content within a course. You can only locate the title of the course. Example: Course: How to Make Your Bed Chapter: Pillows Lesson:
                                                                                                        • Citations Problem

                                                                                                          I'm having an odd problem with the "Add Citations" feature of Zoho Writer. When I add a citation using the "Fetch website details online" feature it works the first time I use it but if I try it a second time by clicking that link nothing at all happens
                                                                                                        • Zoho Leave Policy > Portugal maternity Leave 120 days or 150 days

                                                                                                          Hello All In this Portugal maternity Leave policy, the government allow employee to apply 120 days they will have 100% paid salary if they apply 150 days they take 80% of the paid salary minimum 1 days and maximum 120 days or 150 days Should i setup this
                                                                                                        • Zoho People Candidate Unable to see Non Admin Data

                                                                                                          Hello All I have assign this user as specific user as Group CEO and have access all legal entity, business unit division When i login to the user and look into onboarding i do not see any data in the candidate view This is the admin view that i have 2
                                                                                                        • Zoho People Leave Balance Show as Negative

                                                                                                          Hi All I have the Portugal material Leave that policy allows up to 120 days or 150days for employee to apply within 365 days and employees is able to take minimum of 1 days or up to 120 days In my Leave Grant I have set as the setting.
                                                                                                        • Zoho People > Performance > Appraisal > Mismatch between the template-configured module and the currently enabled module.

                                                                                                          Hello There When we enable the performance module there a prompt Mismatch between the template-configured module and the currently enabled module. How do we resolve this
                                                                                                        • Introducing WhatsApp integration in Bigin

                                                                                                          Greetings! In today's business landscape, messaging apps play a significant role in customer operations. Customers can engage with businesses, seek support, ask questions, receive personalized recommendations, read reviews, and even make purchases—all
                                                                                                        • Missde API documentation for Sales Receipt

                                                                                                          Hi! I noticed that the Sales Receipt endpoint is not currently listed in your API documentation (https://www.zoho.com/books/api/v3/introduction/). Could you please provide any available temporary documentation for this endpoint, along with a detailed
                                                                                                        • Zoho People Leave Application Module Error: Leave balance has exceeded as on 09-07-2025.

                                                                                                          Dear All I need to check how do i resolve the issue of Error: Leave balance has exceeded as on 09-07-2025. All my leave have this issue
                                                                                                        • Next Page