Kaizen 126 Circuits in Zoho CRM

Kaizen 126 Circuits in Zoho CRM

Hello everyone!
Welcome back to another week of Kaizen!
Today, we will discuss an exciting topic—Circuits in Zoho CRM.

For starters, we will discuss what Circuits are, how beneficial they are for businesses, different views of a Circuit, and the different states and flow controls.

In the next post, we will discuss associating a Circuit to a blueprint, workflow, and a button, testing and execution, and see a Circuit in action with an interesting use case.

What are Circuits in Zoho CRM?

We use different microservices to accomplish our business needs, but most of the time, we are forced to switch over to multiple places.

With Circuits in Zoho CRM, you can integrate multiple microservices in a single platform and create automated workflows, all within your CRM!

For example, consider that you have an e-commerce application that involves multiple processes like tracking inventory, payment processing, fulfilling and tracking orders, generating receipts and reports, etc.
Typically, you would code this entire logic and use it to fulfill your business needs. But, with Functions in Zoho CRM, you can write the logic for each of these individual processes and simply orchestrate them using Circuits.

So, for the above example, you can simply create an automated workflow using Circuits and use the functions in the right order. That's not just it! You can re-use these functions elsewhere, too.

Another simple example of a Circuit is when you want to automating sending SMS alerts to users when an event occurs. How this is different from a workflow is that in this circuit, you can have a function that triggers an SMS alert, and also a function that sends an email to the user when the SMS alert ails. This involves circuit's functional states and a decision making state.
Like this, the use cases of circuits are endless.

Advantages of Circuits

  • Automate your routines
    Convert all your manual routines to automated workflows to save time. Avoid the need to trigger or interrupt applications to control the system flow, as you can create smooth-sailing, smart workflows that control themselves.
  • Scale fast
    Handle any number of requests hassle free as your workflows get executed on cloud. While Zoho Circuit dynamically allocates resources on need, you can focus more on building your applications rather than managing them.
  • Update in minutes
    Building the business logic of your applications in workflows empowers you to update the applications quickly. Swap or reorganize the components easily and build the modified applications in minutes.
  • Low-code
    Create a circuit effortlessly with the visual drag-and-drop interface, which makes it easier for the users with minimum coding knowledge.
  • Developer-friendly
    Circuits help you manage parallel processes, service integrations, spot failures, retry, and view logs, within minutes. Developers can focus on the business logic and not worry about these factors.
  • Orchestrate CRM Functions
    Use various CRM functions on your circuit to integrate multiple third-party apps and Zoho CRM seamlessly. Write functions once, and orchestrate them in circuits to solve different business needs.
  • Automate IT and business processes within CRM
    Create a circuit, associate it with a workflow, blueprint, or button, and automate your entire business process. With high availability, scalability, and fault tolerance, circuits ensure the performance of your workflow remains consistent even with changing states and an increase in frequency.
  • Diagnose errors and view audit logs
    A detailed log of each execution provides the status of each state's task execution, the payload and parameters passed, and the responses and exceptions generated.
  • Use Existing Functions
    From picking functions you've already tried, tested, and are up and running in your CRM account, to using a circuit within another circuit, this flexibility opens up possibilities of handling so much of your out-of-the-box requirements in a single space.

How are Circuits different from Workflow Rules and Blueprints?

Circuits is simply an orchestration of functions with powerful state management capabilities, along with in-built flow controls to automate the business process.

Workflow rules help us automate repetitive tasks and standardize business processes within the CRM system.
Workflow rules are useful in simple automations that the sales person does on a regular basis, like sending an email after record creation.

Builder View and Code View of a Circuit

Builder View


This view offers an easy drag-and-drop interface to build your circuit. The left pane in this view comprises all the states that can be added to a circuit.
The right pane comprises Configuration and Input/Output.

The Configuration tab lets you give a name to the state, choose its type, and select its next state.



The Input/Output tab allows you to control how JSON data must flow from one state to another through Paths.
Paths are strings beginning with $ that identify the components within the JSON. Specific parts of a JSON can be accessed by denoting their attributes in Input Path, Result Path, and Output Path.


This tab contains the following.

1. Input Path
Input path selects parts of the input JSON to pass to the state. You can also pass parameters to the input as a collection of key-value pairs. The values of Parameters can either be static or parts of the input JSON selected as a Path. For example, if your state's input is
{
"Entry1": {...},
"Entry2": {...}
}
then, you can apply the input path as $.Entry2 within the state definition. So, only the data inside the "Entry2" object will be passed as input to the state.

2. Result Path
After the input is processed by the state, Result Path selects what combination of the state result and the actual state input has to be passed to the output.

3. Output Path
Output Path further filters the data from the Result Path to pass it as state output.

Code View of a Circuit


In Code View, you can define your state machine in a simple JSON-based, structured language. Once a circuit is created, a sample workflow with the pass state as 'State 1' is created by default.

States of a Circuit and Flow Controls

Circuits offer a cascading structure to different states in a business process, allowing you to write functions that each feed their output into the next one, or any other one you pre-define, individually. You can also reroute, pause for a certain period, or feed it in batches to enable just about any sort of action.
Simply put, Circuits have different 'functional states' and 'flow controls' that allow you to automate execute your business process.

Flow Controls

Flow Controls let you control the flow of your circuit. To achieve this, Circuits make use of different states that allow you to make the execution, 'Wait' for another state, 'Pass' the input of a state to another, use 'Success' and 'Failure' to stop the execution of the Circuit.



The different states available are:
  • Pass: Transfers the input from one state to another.
  • Branch: Decides between branches of execution based on input.
  • Parallel: Performs simultaneous executions.
  • Wait: Inserts a delay for a specific time. The maximum wait time is 30 days.
  • Batch: Implements multiple group executions. You can have a maximum of 10 jobs per batch.
  • Success: Terminates an execution, returning 'Success'.
  • Failure: Terminates an execution, returning 'Failure'.
For more details on states, refer to this article.

Zoho CRM

Zoho CRM states help you execute business logic in circuits with respect to the data available in CRM.



You can write functions in the built-in editor or orchestrate existing ones, get the details of a record as an input to other the states, get the details of your org, user, CRM variables and use them in your Circuit.
You can also trigger another Circuit within a Circuit using the 'Circuit' flow control.

'Function' State
Use this state in your Circuit to use an existing function in CRM. Depending on your need, you can configure the input and output, and control data flow in your circuit. Only the functions that are REST API-enabled are shown here.



'Circuit' State
You can use another Circuit in one of the states and configure the flow accordingly.



'Record' State
This state fetches the details of a particular record in a module in CRM. You can choose to pass a portion or all of this state's result as an input to the next state in the circuit. Note that the information displayed will be based on the scope provided to the user.
Depending on where the Circuit is associated(Blueprint, Workflow, Button - Create/Clone/Details/Edit View pages, individual record, mass action), the response of the Record State differs.

'Org' State
This state gives you the details of your CRM org that you can use in your circuit.

'User' State
Use this state in your circuit to get the details of the current user in your org and process this information in other states.

'Org Variable'
This state gives you the details of all CRM Variables in your org.

Error Handling

When you use any of the Zoho CRM states, you can also perform error handling as these functional states tend to have runtime errors.

On TimeOut

When a functional state runs longer than the expected time, timeout errors occur. For handling timeout errors in code view, the field value "errorType": "Error.TimeOut" will be added.

On Execution Failure

When a state's execution fails due to some exception that cannot be processed, it can be handled using execution failure. In code view, key-value "errorType": "Error.ExecutionFailure" is appended.

Custom Error

You can also have custom error handling for your states.
Configure Exception Type and Exception Value to set the error handling options based on the error code or error message delivered by the state's output.
Retry the function in case of failure or timeout, set the Attempt (number of retries) and Delay (wait time after failure for every retry attempt).
In case of failure, if the retries fail to fix the error, the State will Fallback the error output to the Next state in the Result field.

We hope you found this post useful. Stay tuned for part 2!
Let us know if you have any questions or suggestions.


Cheers!
Shylaja S



    Access your files securely from anywhere


            Zoho Developer Community




                                      Zoho Desk Resources

                                      • Desk Community Learning Series


                                      • Digest


                                      • Functions


                                      • Meetups


                                      • Kbase


                                      • Resources


                                      • Glossary


                                      • Desk Marketplace


                                      • MVP Corner


                                      • Word of the Day



                                          Zoho Marketing Automation


                                                  Manage your brands on social media



                                                        Zoho TeamInbox Resources

                                                          Zoho DataPrep 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

                                                                                                  • Getter error message Number of statement execution limit exceed Line:(216)

                                                                                                    Hi, this script is giving me error message "Number of statement execution limit exceed Line:(216)". Please advise htmlpage Pay_Period_Details(PayPeriodID,AgentID,ShowPrint,start_range,end_range) displayname = "Pay Period Details" content <%{ /* Get The current Pay Period Record */ Int_Pay_Period_ID = PayPeriodID.toLong(); Current_Pay_Period_Record = Pay_Period[ID == Int_Pay_Period_ID]; Previous_Pay_Period_ID = thisapp.Application.GetPreviousPayPeriodID(Current_Pay_Period_Record.ID); /* Checking Agent
                                                                                                  • Useful enhancements to Mail Merge in Zoho CRM

                                                                                                    Dear Customers, We hope you're well! We're here with a set of highly anticipated enhancements to the Mail Merge feature in Zoho CRM. Let's go! Mail Merge in Zoho CRM integrates with Zoho Writer to simplify the process of customizing and sharing documents
                                                                                                  • How create deal with label added using api

                                                                                                    Hi, I am creating automations in n8n for Zoho CRM. I want to create a new deal with a label added at the same time. However, I keep getting an error. Using the API, I can create a deal successfully, but when I try to add a label during the deal creation,
                                                                                                  • Checklist/ save to onedrive/ a group of items invoicing in Zoho FSM

                                                                                                    hi, is there a way to add a specific checklist to any WO without passing eachtime by the model customization? can we save file such picture directly in our sharepoint ak onedrive? is there any way to add a group of item pre defined to make invoicing easier
                                                                                                  • Message as a bot to user now says: "The message recipient id sent in the API is your own user id. You cannot send messages to yourself."

                                                                                                    Hi   I used to be able to have a bot message myself in cliq when something happened . Now the connector Message as a bot to user gives me this error when testing: Zoho Cliq says "The message recipient id sent in the API is your own user id. You cannot
                                                                                                  • Can I Integrate ADP Payroll with Zoho Books?

                                                                                                    Hi, I am hoping that I can integrate ADP Payroll with Zoho Books so that I do not need to manually input the payroll journal entries. Is this possible? If so, how do I do that?
                                                                                                  • Lookup field - Can I avoid using advanced search?

                                                                                                    I have a lookup field in my app that has surpassed 500,000 records, now basic search is disabled and I'm forced to use advanced search. That adds multiple steps to what used to be very simple. Before: Select field > Type last digits of product code and
                                                                                                  • Invalid Value Type Error Conditional Formatting

                                                                                                    Hello, I'd like to use conditional formatting on a table using Classic conditional formatting for Cell Value, but when I attempt to apply the formatting, I get the error "Invalid Value Type: Value must be of type number". The error is being produced because
                                                                                                  • Simplify Zoho API integration with Deluge’s invokeAPI task

                                                                                                    Hello all! Happy New Year! As we kick off 2025, we’re excited to share some of the latest updates to enhance your Deluge experience. While Deluge already offered robust API integration capabilities, we’ve taken it to the next level with the introduction
                                                                                                  • Automation #6 - Prevent Re-opening of Closed Tickets

                                                                                                    This is a monthly series where we pick some common use cases that have been either discussed or most asked about in our community and explain how they can be achieved using one of the automation capabilities in Zoho Desk. Typically when a customer submits
                                                                                                  • Reporting tags

                                                                                                    Hi, I suggest to improve the integration with Books, adding the faculty to especify a reporting tag from payment pages. Thanks!
                                                                                                  • Can I add Conditional merge tags on my Templates?

                                                                                                    Hi I was wondering if I can use Conditional Mail Merge tags inside my Email templates/Quotes etc within the CRM? In spanish and in our business we use gender and academic degree salutations , ie: Dr., Dra., Sr., Srta., so the beginning of an email / letter
                                                                                                  • SEO Support for Jobs

                                                                                                    I know Zoho recruit has some very basic metadata settings at the job board level which is not really helpful. We are wanting to utilise SEO and other Google features (like Google Jobs) which require the ability to add structured data to each job posting
                                                                                                  • Workdrive Oauth2 Token Isn't Refreshing

                                                                                                    I have set up oauth for a bunch of zoho apis and have never had a problem with oauth. With workdrive i am using the exact same template i usually use for the other zoho apps and it is not working. All requests will work for the first hour then stops so
                                                                                                  • Create deal from estimate

                                                                                                    Hello, I have integrated CRM and books. I created an estimate on CRM but I would like to allocate that estimate to a deal with the contact. How can I do this please?
                                                                                                  • Selecting Multiple Transactions

                                                                                                    Is there a way to select multiple transactions when in a bank account and batch categorize them?
                                                                                                  • Email client fails to connect to IMAP & POP EU Servers for ALL users

                                                                                                    For the last couple of days, all users on my account are failing to connect to the Zoho EU mails servers. This is using mobile app on various phones & desktop mail clients on different computers. Everything works fine when using webmail & email is still
                                                                                                  • Email Notification to WordPress Blog Subscribers

                                                                                                    You know when a new WordPress blog is published, your subscribers will be notified via email with a link to that blog? Jetpack does it but I'm hoping to get away from it or any other specialized WordPress plugin (like MailPoet), and instead, use a dedicated
                                                                                                  • Domain verification is in progress... (How long do I need to wait?)

                                                                                                    Trying to setup my first email domain by connecting with GoDaddy. Have been here for quite some time and the screen is not changing. How long should this take?Send DataSend Data
                                                                                                  • Se detectó una actividad inusual para esta IP. Inténtelo de nuevo más tarde.

                                                                                                    Recibo el siguiente mensaje al intentar agregar una nueva cuenta de correo electronico a mi dominio @grupomgglobal.com Necesito una respuesta urgente a este asunto ya que he tenido varios inconvenientes con mi el servidor de correo. Si sigo asi creo que
                                                                                                  • Oops! Something went wrong. Try again later When trying to send email

                                                                                                    Hi, This error is appearing everytime i am trying to send an email. Oops! Something went wrong. Try again later Please help.
                                                                                                  • Stock Count - Extracting Data

                                                                                                    Hi, I really like the new stock counting functionality however I can't find any way to extract the stock count results. -The build in stock count report is limited and has no export option - There is no export options from within the stock count screens
                                                                                                  • Search Option not working

                                                                                                    My search option is not working properly. I type in what I'm searching for, and it says not results found. How to I get this issue resolved?
                                                                                                  • Missing users in CRM workflow notification and "share with zoho cliq"

                                                                                                    Hi, I'm creating a workflow that should send a notification to a Zoho Cliq user when a Lead with specific lead source enters the CRM. The problem is that not all users are showing up in the select menu, when I choose "Notify to Zoho Cliq - Users". As
                                                                                                  • My email client shows no emails anymore

                                                                                                    I let my account expire due to old payment method. I repurchased it I turned back on IMAP Then all my emails disapeared. Everything is fine in the webview and and zoho mail app
                                                                                                  • Question about on User input workflows

                                                                                                    In my app I have a field for device IMEI which should trigger a check on an external API through an invokeUrl. But it seems the workflow will only run after the user has moved the focus away from the field by clicking somewhere else. However, if the user
                                                                                                  • Workaround for Backstage's non-compliant cookie banner

                                                                                                    Hi Does anyone has a workaround for the cookie banner Backstage uses when you publish an event? Currently there is no "Decline All Cookies" button, only "Accept All" and "Customise". Which means it is not compliant with data protection requirements, as
                                                                                                  • Creating a code for Task to event creation

                                                                                                    I am looking to automate an event creation to do the following: When a task is created for a user, create an event at 530PM simply called TASKS. This will serve as a reminder that we have at least one task that needs to be addressed. We miss the task
                                                                                                  • Creating smart filters manually

                                                                                                    Hi Team, One of my colleagues accidentally deleted the Notification folder in Zoho Mail. Now all the emails are directing to spam instead of inbox. Is there any way to create the smart filter manually?. With Regards, Logeswar V
                                                                                                  • Zoho mail stopped receiving emails

                                                                                                    My Zoho email addresses that are linked to a domain suddenly stopped receiving messages yesterday, even though I've been using Zoho mail without problems for 1,5 years. I receive this reply to test emails: "553 Relaying disallowed". Due to this, my SMTP
                                                                                                  • Connecting Zoho Inventory to ShipStation

                                                                                                    we are looking for someone to help connect via API shipStation with Zoho inventory. Any ideas? Thanks. Uri
                                                                                                  • Auto CC - Moving Departments

                                                                                                    We have Auto CC e-mail replies to your support mailbox enabled. We have two departments: Helpdesk (helpdesk@domain.com) Delivery (delivery@domain.com) If we create a Helpdesk ticket, and reply, replies are CC'd to helpdesk@domain.com (OK) We then move
                                                                                                  • Not getting copy of emails sent from Zoho CRM in my email sent box

                                                                                                    Where is the setting to make sure I receive a copy of an email I sent to a contact in the CRM in my email SENT folder?  (I use gmail) Thanks
                                                                                                  • Custom image for each contact using merge tag

                                                                                                    Hi, I'm wondering if it's possible to set up an email campaign to display a different image for each contact using a custom field for the image url. I tried inserting custom html: <img src='$[UD:APP_IMAGE_URL||]$'/> but the editor seemed to reject this and did not actually add anything to the email template. Has anyone got any ideas? cheers, Jeremy
                                                                                                  • CASE Module - email function

                                                                                                    HI there, I dont know if this has been asked or answered before as i couldnt find it on the forums. Issue: when a new case is raised, it goes under case tab and everything is captured. Then how do i send emails to the client who raised case with the details
                                                                                                  • Use of External Email Services

                                                                                                    Would like the ability to use an external SMTP service to send emails campaigns in Marketing Automation.  Services like SendGrid, Maligun Amazon SES, etc
                                                                                                  • Requiring Proxy

                                                                                                    We are trying to get support from a company that uses Zoho assist. When we download the helper it is questing that we put in a proxy. What info do we need for the proxy / or to not need a proxy? I have tried a hot spot and allowing the program through
                                                                                                  • Can I add social media icons / widgets to my email template in Zoho CRM?

                                                                                                    I know there are more features in Zoho Campaigns (vs Zoho CRM) when creating an email campaign/template. For instance you can easily add social media widgets. But is there a way to add social media widgets when creating an email template in Zoho CRM? I created a single image in Photoshop of the social media icons I want to include. But if I were to add them in my template using the "IMAGE" component, I will only be able to include one hyperlink (as it is a single image); I cannot hyperlink them individually.
                                                                                                  • Filter report using dynamic filter using function not working

                                                                                                    Hi - I am trying to dynamically filter a report as follows: when I save the filter it looks like this: However when I run the report it is not returning results as I expect. I have tested the function. If I copy and paste the output of the function and
                                                                                                  • All notes disappeared

                                                                                                    I've been using the notebook app for over five years on my phone without being logged into an account. A few days ago I opened the app and all my notes had disappeared. Since then I tried restarting my phone, updating the app and logging into my account,
                                                                                                  • Next Page