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




                                          • Desk Community Learning Series


                                          • Digest


                                          • Functions


                                          • Meetups


                                          • Kbase


                                          • Resources


                                          • Glossary


                                          • Desk Marketplace


                                          • MVP Corner


                                          • Word of the Day


                                          • Ask the Experts





                                                    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

                                                                                                    • Solicitud de asistencia para migración de Unidades Compartidas de Google Drive a Zoho WorkDrive

                                                                                                      Estimado equipo de soporte de Zoho, Nos gustaría solicitar asistencia para realizar la migración de nuestras "Unidades Compartidas" de Google Drive a Zoho WorkDrive. Actualmente, tenemos varias unidades compartidas en Google Drive que necesitamos transferir
                                                                                                    • Zoho marketing hub integration with WordPress WooCommerce

                                                                                                      Hello All,  I am a Zoho One User and we are using Zoho Marketing Hub we also have a website on Wordpress and we use Woo Commerce as our store.  im looking to find out if Zoho Marketing Hub Integrates with WooCommerce   ideally we would like to create Journeys or campaigns series based on customer behavior such as buying or already have purchased specific products. or if they go to the store but don't buy (abandon cart follow)  i saw that there is a wordpress plugin for Zoho Campaigns https://wordpress.org/plugins/zoho-campaigns/ but
                                                                                                    • Disable Subform Actions using Client Script Add Row, Edit, Delete

                                                                                                      Currently we cannot disable subform actions such as Add Row, edit row using client script It will be really beneficial if we can disable these actions from Client Script
                                                                                                    • Offline for Maintenance Option

                                                                                                      Making changes to a live application can cause problems. I'm suggesting a new application settings option to temporary disable all access to an app so the admin or developer can make changes without any user interference. Additionally, while the app is offline, there should be some ability to present the users with a customized notification page (perhaps a view within the app itself). For example, "This application is undergoing maintenance and will be back online Sunday at 5 PM. Please email smith@net.com
                                                                                                    • Join Zoho Meeting only via Web browser and not with Zoho Meeting App

                                                                                                      Dear Zoho team, according to the documentation [1], Zoho Meeting only offers web view for Chrome and Firefox on a desktop. For other browsers and devices, participants can only join a Zoho Meaning with the Zoho Meeting App installed. This is a big hurdle
                                                                                                    • Recurring Events Not Appearing in "My Events" and therefore not syncing with Google Apps

                                                                                                      We use the Google Sync functionality for our events, and it appears to have been working fine except: I've created a set of recurring events that I noticed were missing from my Google Apps calendar. Upon further research, it appears this is occurring
                                                                                                    • Google Maps API integration into Forms

                                                                                                      I looked around a good bit and could  not find anything on this topic. I was curious about using the Google Maps API on a Zoho Form. Specifically an order form for a product that we will only deliver within certain City Limits. We currently use the API to call the exact address (as dictated by Google) and if the City name does not match where we service it is very evident. (Using FormCraft Form in Word Press) The "exact address" name is also used later in the process as well.  I do not see a way
                                                                                                    • web page becomes flickering after being made into WebTab

                                                                                                      I create a webtab in Zoho CRM like this it uses this URL below: https://blueraycargo.id/kalkulator-berat-volume/ as you can see, if you open the bare URL then it will have no problem, but after it becomes a WebTab then it is flickering constatly. what
                                                                                                    • Kaizen #182 - Queries in Canvas List View

                                                                                                      Hello everyone! Welcome to another week of Kaizen! We're back with another post in this series on Queries in Canvas List View. Queries in Zoho CRM allow you to dynamically retrieve data from CRM as well as third-party services directly within the CRM
                                                                                                    • Facing issue when sent mail using zeptomail SMTP - Hard bounces || webscreenscraping.com

                                                                                                      Hi Support, User ID: 706899850 We are facing an error when send and email using Zeptomail SMTP especially from sales@webscreenscraping.com to sales@xbyte.io Reason: policy-related Message: 5.2.3 MailPolicy violation Error delivering to mailboxes Remote-MTA:
                                                                                                    • Dynamic Date Filtering for KPI Widgets – Need Help with Query Table

                                                                                                      Hello, I'm seeking help with setting up dynamic date filtering for my KPI widgets in Zoho Analytics. Below is an overview of my setup and the issues I'm facing: Why: I need my KPI widgets to update dynamically based on a date range selected via a dashboard
                                                                                                    • ZOHO DESK ヘルプセンターの言語選択メニューの表示方法

                                                                                                      ZOHO DESK のヘルプセンターを構築し、多言語化設定をしました。 顧客のヘルプセンター画面右上に言語選択メニューが表示されないため、弊社の契約先会社に問い合わせましたが、「通常は多言語化をオンにすると表示するためCSS を触り過ぎではないか」 という指摘のみでした。 試行中ですが表示できません。 何か要因となる情報をお持ちの方がいましたらご教授いただけますと幸いです。 ↓の赤枠を表示したいのですが、表示できません。
                                                                                                    • Zoho Sign up forms on Wordpress website not working smoothly

                                                                                                      We have set up the forms on the website and linked them to respective email journeys. But when wesubmit the form the email generated/sent to user is not consistent. Sometimes the journey email is sent, sometimes a email verification message is sent ,
                                                                                                    • Windows Security Alert

                                                                                                      Hi, I'm using Zoho Assist with feature remote support session. I'm inviting a end user to a remote support session. When a user connects to a Zoho Assist remote support session we’re seeing Windows Security Alert pop up requesting changes to the firewall.
                                                                                                    • field is not saving on lead

                                                                                                      Hi, Not sure what i changed but on edit in a lead, i am inputting details and its not saving. just highlights it in yellow with no error message.
                                                                                                    • Creating Layout Rule With Formula Field

                                                                                                      By The Grace Of G-D. Hi, I see that i cannot use Layout Rules to show/hide Formula Fields. Is that something you plan on adding sometime soon?
                                                                                                    • Activity or History Log User Login

                                                                                                      Hi Everyone, I have Zoho Customer Portal, which has pages and reports. Is it possible to create 1 field such as true/false to find out users who have opened the customer portal? Like a kind of user activity log. Thank you so much.
                                                                                                    • TeamInbox Rules Not Working

                                                                                                      I have set up very basic rules, both at a team and personal level, but nothing works. E.G. Trigger: Inbound Message From: [sender email address] Has Attachments Apply Tag: [tag selected] The above ruleset is very broad and should automatically tag all
                                                                                                    • New Customization options in the module builder: Quick Create and Detail view

                                                                                                      Hello everyone, We have introduced two new components to the module builder: Quick create and Detail view. The Quick Create Component It is a mini form used to create a record and associate it to the parent record from a lookup field. For example, if you have a Deals lookup in the Contacts module, then you can associate existing deals or create a deal and associate it with the contact. You can customize this Quick Create form by adding standard as well as custom fields. There is no limit to the number
                                                                                                    • Set Approval for particular Reporting managers in zoho creator

                                                                                                      i am creating a leave management system in zoho creator.I want to create a approval workflow.There are various employees each employee has different reporting manager when employee apply for a leave then the leave should be able to approved by the manager
                                                                                                    • Function to check frequency of customer ordering patterns

                                                                                                      Hi, I'm no coder, so I thought I could make use of Chat GPT to generate some Deluge script to create a function that would check order frequency of our customers so that I could send an email if they go beyond their usual order pattern. Chat GPT and Claude
                                                                                                    • Possibly a stupid question: When I sync from Zoho CRM to Campaign, should I see those contacts in the Contacts list on Campaign?

                                                                                                      I have just initiated and completed a sync of my existing Zoho CRM contacts over to Zoho Campaign. It seems to have completed and synced around 500 contacts. However, those contacts do not appear in the All Contacts list (or any other list that I can
                                                                                                    • Pin multiple columns and adjust column widths in CRM subforms

                                                                                                      Hello all, Subforms act as secondary forms or tables in which you can associate multiple line items to a primary record and thereby ensure more structured and comprehensive data organization. We've made some recent enhancements to subforms. Here's what's
                                                                                                    • IN BIGIN MOBILE APP ZOHO INVOICE IS NOT VISIBLE

                                                                                                      I HAVE INTEGRATED ZOHO BIGIN WITH ZOHO INVOICE IN WEB IT IS WORKING VERY FINE WITH ZOHO INVOICE VISIBLE , HOWEVER IN MOBILE APP ZOHO INVOICE IS NOT VISIBLE IN THE TABS , IT IS VERY DIFFICULT TO CHECK THE PIPELINE WITHOUT THE INVOICE , I HAVE TO DOWNLOAD
                                                                                                    • Conexão de Meta Ads - A busca pelo Cálculo do ROI

                                                                                                      A empresa onde trabalho está em busca de calcular melhor o retorno sobre o investimento de das suas campanhas do Meta Ads. A zoho junto com a Google fez um excelente trabalho e disponibilizou o cálculo desse retorno de forma maestral com o dashboard abaixo.
                                                                                                    • Update Client Record based on creation of custom module record

                                                                                                      Hi! Hoping for someone's help with this one. I have a custom module called 'Agreement History. Whenever a deal is won, it creates a new record in this module with associated 'Products' and 'Clients' to track rental history and contracts. What I'm trying
                                                                                                    • Automatic bundling with sales orders

                                                                                                      What I do is I make products to order. Some of my products share same part. So sometimes one product sells better then the other one. When I create a bundle now I might sell out one product but then I cannot make it anymore because I already use the part
                                                                                                    • Flow based on New Deal - layout field problems

                                                                                                      Hi. I've built a Flow to create a Deal-specific folder within WorkDrive. It works except for referencing the Deal's layout. In my Zoho CRM, there are two types of Deals (separated by layout). For my Flow: Trigger on New Deal Then, I call 'Fetch module
                                                                                                    • How to associate a document sent in Zoho Sign with an deal in the CRM?

                                                                                                      Hi, often documents are loaded in Zoho sign and sent for signature. These sometimes are linked to a deal in the Zoho CRM and would be nice to see the status of the document within the CRM. I am aware of the integration, but that assumes that the document
                                                                                                    • How to install Widget in inventory module

                                                                                                      Hi, I am trying to install a app into Sales Order Module related list, however there is no button allow me to do that. May I ask how to install widget to inventory module related list?
                                                                                                    • Zoho Sheet view has two way sync or one way? Sheet view to CRM and what about CRM to Sheet view?

                                                                                                      I created a zoho sheet view. I can make changes and these changes are saved back to CRM. I have copied the link of this zoho sheet view for future easy access. Now I go to CRM, and update a single record in CRM. Now if I use the zoho sheet view link that
                                                                                                    • Enable Filtering by Notes in Accounts & Other Modules

                                                                                                      I noticed that we have the option to filter by notes in the Contacts module, which is great. However, in our company, we add notes specific to an Account, and currently, there's no option to filter Accounts with notes. Can this be enabled? It would also
                                                                                                    • Whats App Automation

                                                                                                      It would be nice to be able to send out an automated whats app message template on moving stages or creation of a ticket (same as you can do for automated emails). Currently only automated emails can be sent. Also, if whats app could be used more effectively
                                                                                                    • A fresh interface and functionality improvements for Zoho CRM's data sharing settings

                                                                                                      Data sharing is essential for maintaining proper access controls in your CRM. Whether you're setting default permissions or defining custom sharing rules, these settings determine how records are shared among users, roles, and groups. Previously, navigating
                                                                                                    • Capture GPS location field

                                                                                                      When using a mobile phone to complete the form, I need to capture the GPS location. When this field going to be available? Same question for taking pictures with mobile phone and capturing that picture automatically. Thanks
                                                                                                    • I can't auto-scheduling calls down - the code does not change anything

                                                                                                      Hi, I was trying to set a function that auto-schedules calls based on their call result; i.e "Requested more info". I had also included a reminder to send an email in the code. I logged a test call and nothing changed. Is there anything wrong with the
                                                                                                    • How can I ensure that emails sent and received in my Policy module also appear in the associated Account module under "Emails" ?

                                                                                                      I'm working with ZOHO CRM and I have separate Policy and Account modules. Currently, when I send or receive emails related to a policy, they are stored within the Policy module. However, I want these emails to also appear in the corresponding Account
                                                                                                    • How can I create a deal with multiple payment milestones in Zoho CRM?

                                                                                                      Hi. We are a services based company and most of our deals involve monthly invoicing for T&M work or payment milestones for fixed price projects. How can I create a Deal in CRM that shows monthly (or multiple) payment milestones, rather than just the total
                                                                                                    • CRM

                                                                                                      I have a portal set up where a contact can see other contacts within an account automatically. When a contact in the portal enters a deal, how do I make sure that deal is assigned to the account so other contacts in the account can see the deal was generated?
                                                                                                    • How do I add new line and format text in zoho desk ticket?

                                                                                                      I am generating a ticket via API and looking to update "description" field of ticket whenever I need. Is there a document where I can find supported formatting for description field on a ticket.  I need to find: Adding a new line and adding bold text,
                                                                                                    • Next Page