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





        • Recent Topics

        • New in Zoho Sign: Allow recipients to review and change associated recipients

          Greetings! We are happy to announce the addition of a new recipient role, Manages recipients, in our signature workflows. This role enables a recipient to review, modify, or add details for any recipients associated with them in the workflow. This ensures
        • Zdk-cli

          As i have tried to login to zdk cli as it returns this error ✔ Success! Logged in as JAYANTHAN ✖ Error during initialization of zdk api supported only in sandbox environment
        • Zoho Creator Populate radio field with values with all the created rows subfor

          I have Main Form where i have a lookup field where i get brewery names and the number of tanks as a multiline text field with a list of beer names Based Brewery selected and bbt_tanks number i create rows in the subform and now i want to populate list
        • Mapping a new Ticket in Zoho Desk to an Account or Deal in Zoho CRM manually

          Is there any way for me to map an existing ticket in Zoho desk to an account or Deal within Zoho CRM? Sometimes people use different email to put in a ticket than the one that we have in the CRM, but it's still the same person. We would like to be able
        • Customer Portal Zoho Desk | Sort ticket list

          Hello, If you view the ticket list inside the desk portal (https://xyc.zohodesk.eu/portal/de/myarea?departmentId=xyz) all tickets are displayed depending on the filters: department "my tickets" / "team tickets" status group/type channel My questions:
        • Train Zia answer bot on only part of Knowledge Base?

          We are trialing Zia answer bot and hope to use it on the knowledge base to help our users find the information they are looking for. I have found how to train Zia on the entirety of our knowledge base. But is there a way to train it on only certain categories
        • Customer/item(s) bought view

          Hello In Inventory/Customers/Transactions tab, how do I see what it is the customer actually ordered/bought without having to open each SO? Our customers buy a number of items thoughout the year. I've look at each transactions drop down, and no-where
        • ERROR: Product type cannot be changed for Items having transactions.

          I have mistakenly added a product type as goods for an item that was a digital service. Now when HSN/SAC became mandatory, this brought my attention to this error I did. So I tried changing the product type but it displayed this error message Product
        • Inventory Asset vs Finish Goods vs Work in Progress please explain or help me choose

          New to this so please if you can help in any way I would really appreciate it. So here we go. I make and sell and item which is made out of bunch of other items. (Composite Item). Now one of the parts that the item is made from is also a composite item.
        • WorkFlow to Update Custom Field in Sales Order with Tracking Information from Shipment of that Sales Order

          Hello All- I'd like to update the sales orders with the tracking information I enter in the shipping document. What is the proper variable to get the tracking information out of the shipping document? See attached.
        • ZOHO Desk-Enable Ticket Notification sound

          Hi, I answer the helpdesk tickets for Sevenstar. How can I enable the Ticket Notification sound when I receive a new ticket?
        • Differentiating between invoice templates when adding custom fields

          We are adding HS codes to the items which we would like published on our international customers invoices plus other export data required. We don't need this data on our domestic customer invoices. We have setup an invoice template for them but it if
        • Batch Tracking Enhancements In Zoho Inventory

          Hello users, We’re excited to announce that we’ve taken batch tracking to a whole new level in Zoho Inventory! We’ve made it more accessible and easier to use than ever. Here’s a quick look at the improvements: 1) A New Way To Create or Modify Batches
        • CRM to Writer Mail Merge Preview not working

          When performing a mail merge from CRM to writer the preview function does not work. I get the following error. I am a Zoho one user on a ChromeOS. I have been successfully using mail merge from CRM to Writer about 4 years. This error seemed to coincide
        • Workflow not triggered by custom function field update

          I have a simple workflow that triggers when a field is updated on a Deal page. It works fine when I "manually" update the field via "edit" on that Deal page. It does NOT however work or trigger when that same field is updated with a custom function. I need to workflow to trigger when the field is changed by a custom function also. Why is this not working? The field content is correctly changed by the function, but the system isn't recognizing that as a change relative to triggering the workflow for
        • Version history for Zoho CRM Functions

          Hi Zoho Support, I am wondering, there is no topics been posted for requesting the Zoho CRM Custom Functions Version history. It would be great to have mandatorily needed feature in Zoho CRM custom functions. Is there any work going on for this feature.
        • Zoho CRM's V8 APIs are here!

          Hello everyone!!! We hope you are all doing well. Announcing Zoho CRM's V8 APIs! Packed with powerful new features to supercharge your developer experience. Let us take a look at what's new in V8 APIs: Get Related Records Count of a Record API: Ever wondered
        • Bookmark order

          Hi all, We have a very big document/template that requires manual editing after doing a mail merge. To make this easier, I thought I would add bookmarks to navigate to the areas that will require editing. I thought these would be in order that they appear
        • How do I associate an expense to multiple projects?

          How do I associate itemized expenses to multiple projects, like assigning each line to the respective project
        • Show Zoho Books Retainer Invoice in Zoho CRM

          Hi Support, How can I get Retainer Invoices created in Zoho Books to show in Zoho CRM? If a sales person needs to collect an upfront deposit, they should be able to see that the retainer invoice has been created and paid. Thanks, Ashley
        • Creator portal user do not accept user password upon creation

          I placed a request at Zoho and they are working on it, but I try here too in case somebody has already the answer: Today, sudently, my customers that tried to join the portal were not abble to enter a valid password, even if the password had all the necessery
        • Shopify sales orders creating a new account in Zoho

          Hi all, I am having a slight issue with the shopify integration. Whenever a customer purchases from the store, shopify automatically creates a sales order in inventory. The issue is that it creates a new account for the customer's name instead of attaching
        • Its 2022, can our customers log into CRM on their mobiles? Zoho Response: Maybe Later

          I am a long time Zoho CRM user. I have just started using the client portal feature. On the plus side I have found it very fast and very easy (for someone used to the CRM config) to set up a subset of module views that make a potentially extremely useful
        • Multiple Zoho Attendees in a Customer meeting

          We are having constraints with having to log duplicate meetings when we have 2 Zoho users attending a customer meeting. What are the options to resolve this? You can add participants, but you cannot report on them. What can be done to avoid creating so
        • Allow 2 logos for Branding, one for Light Mode and one for Dark Mode?

          Our logo has a lot of black text on it. If we leave the background transparent, per recommendation of Zoho, when a user is viewing a file and turns on dark mode, our logo is not really visible and looks really weird. It would be really great if we could
        • CRM Campaign -> Create Campaign ->Zoho Campaign. Add to Sender Address dropdown options (2024/08/01)

          I'm trying to add different Sender Address and Reply-to Address options to a new campaign created through Zoho CRM. There is one sender and reply-to address available and it is not the account I'm logged in with. The dropdown options do not match what
        • Create new ticket when another specific ticket is closed

          Hi. How can I create a ticket when another specific ticket is closed? So I have a ticket with subject 'Create agreement' connected to the contact of a customer. As soon as I close this ticket, I want that a new ticket is created (connected to the same
        • How can a Zoho Desk Admin access restricted files?

          How can a Zoho Desk Admin access restricted files from Zoho Desk that are not displayed to agents on tickets due to file type restrictions?
        • Why is my Lookup field not being set through Desk's API?

          Hello, I'm having trouble setting a custom field when creating a Ticket in Zoho Desk. The endpoint I'm consulting is "https://desk.zoho.com/api/v1/tickets" and even though my payload has the right format, with a "cf" key dedicated to all custom fields,
        • Ticket template - Send email to multiple contacts

          Is it possible to set up a ticket template with multiple contacts selected to receive an email, rather than just one contact as the default? We use Zoho Desk to send an email report to a group of contacts every day, and have to manually add each email
        • Enrich your CRM data and keep them updated

          You spend a lot of your time and efforts in generating quality leads for your business. While generating leads is a challenge in itself, the real deal begins when sales reps try to nurture these leads and convert them as customers. So how equipped is your sales team with information about your leads matters a lot.  For example, you might be using webforms to generate leads and collect customer information from your website. The lesser your webform fields are, the more your sign-ups right? From optimizing
        • Feature Request – Support for Stripe Direct Debit for Canadian Customers in Zoho Books

          I’d like to request support for Stripe Direct Debit as a payment option for Canadian customers within Zoho Books. Currently, while Stripe credit card payments are supported for Canadian businesses, there is no option to enable Direct Debit (ACH/EFT) through
        • 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
        • Zoho desk domain mapping not working

          Hi, I have followed this knowledge base support from your zoho site: https://help.zoho.com/portal/kb/articles/support-customers-from-your-own-domain-domain-host-mapping . First created a sub-domain(support.website.com), then went to zone editor to point "support.website.com" to cname desk.cs.zohohost.com . But it won't work out. What did I lack? Please I need it very much. Please see images below of the result: Please see below images of what I did: 1.)  2.) 3.) Hope to hear from you soon.
        • Zoho Analytics pulling data from Zoho Sheets and Zoho Forms

          It would be smart to have Analytics import data from Zoho Sheets or Forms. 
        • Feature Request – Support for Saskatchewan PST Self-Assessment in Zoho Books

          I’d like to suggest a feature enhancement for Zoho Books regarding Saskatchewan PST (SK PST) self-assessment. Currently, when filing the SK PST return using Zoho Books’ return generator, there is a field labelled “Consumption Tax”, which is intended for
        • Exporting Presentations with Embedded Integrations

          I am embedding Zoho Analytics charts and tables - how can I export the presentations so that the embedded images show ? At the moment it just shows broken images . *note* I do not need the exports to have the live data or links - just a snapshot of what
        • Bug in Total Hour Calculation in Regularization for past dates

          There is a bug in Zoho People Regularization For example today is the date is 10 if I choose a previous Date like 9 and add the Check in and Check out time The total hours aren't calculated properly, in the example the check in time is 10:40 AM check
        • Embedding Zoho Analytics - is the data always 'live' ?

          When embedding "live" Zoho Analytics data into a template with the intention of creating a monthly presentation - how are the embedded filters saved ? When a filter is applied to a presentation from a template is it then fixed for sharing or will it always
        • Zoho Flow Doesn't Detect Desk Ticket Custom Field Change

          I have a Flow that is configured to be triggered when a custom field on a ticket changes. I also have a Schedule in Desk that runs a script that changes the custom field. When I change the custom field manually in the Desk interface, the Flow runs as
        • Next Page