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

    • Not able to change colors help center

      Hi. How can I change the orange color in the help center? You can change everything besides this font color And how can I remove the part on the bottom?
    • Chart with Filtered Data vs Unfiltered Data

      I am looking to create a chart view that displays the full data set vs a subset of the data filtered by user filter. However I do not seem to find any method by which to exclude a plot from the applied filter or any other method by which to display the
    • How to get a list of selected records into a button-function? Here is how!

      So, you might know already how to get a button on a page somewhere and perform actions with a function when pressed, but how about a button that only works with the records you selected in the list view? The button selected is a custom button in the modules
    • How to Add Break line / Return on button click

      I need to return the text concate with difference field from lead with line break i try "\r" ,"\n" "<br>" return "ali \r\n <br> baba"; None of above work.  i expected result something like this  ali baba but got this  ali \r\n <br> baba so, how can i
    • How to get batch number of item by api?

      Hi there, Is there any way to get batch number of item by api? Batch number is the batch reference number in https://www.zoho.com/inventory/help/advanced-inventory-tracking/batch-tracking.html . When I call the https://www.zoho.com/books/api/v3/#Items_Get_an_item
    • Automatically assign Contacts to Account owners

      Hi, I have a finite number of accounts set up in the CRM, and each new contact that comes in is automatically assigned to an Account according to a rule I set up. I want the Contact owner in the Contacts module to be assigned to the relevant Account owner.
    • Filter embedded report

      How to filter embedded report in a page, below code is not working. dateField => startDate & dateField=< endDate The report should print on page containing records from startDate to endDate. params='zc_Header=true&amp;Service_Date__gte=<%=startDate%>&amp;Service_Date__lte=<%=endDate%>'
    • Sample Ticket - Created from Bot Preview

      Why is Zoho desk adding bot created tickets?
    • Serious question: Are there actually "solo-preneurs"/small business owners who made Zoho-one work well for them?

      L.S. After already many years of continued struggle with Zoho-One, I am seriously wondering if there are actually solo-preneurs (one person small business owners - without a large, dedicated IT dept.) who got it (Zoho-One) to work well for their businesses.
    • Number of Workflow runs

      Is there a way in Zoho desk to see statistics regarding workflows, rules and other automation objects? Would be nice for several reasons: You could ensure that your workflows are actually running. You could determine which ones weren't being used so you
    • Announcing new features in Trident for Windows (v.1.18.6.0)

      Hello Community, Trident for Windows is here with some new features to elevate your workplace communication. Let's take a quick look at what's new. Ask and send read receipts for emails You can now request read receipts for specific emails while composing,
    • Increase subscription prices for existing subscriptions

      Hi, Does anyone know how we could achieve the ability to increase the subscription fee for our existing customers based on a % increase. We are not yet using Zoho Billing (Subscriptions) and I'm not sure if it is a good fit for us. But we would need to
    • Why developing custom function development made so difficult for Zoho Projects!!

      Hi Zoho Team, I am trying to write function to automate a process but whatever API name or Column Name I use, the API isn't populating certain fields. Even the standard fields aren't getting populated through API. It's already exhausting to find all API
    • Fixed asset management

      I want to know if there is any individual module for fixed assets management
    • Delete / Modify Default Career Site - Zoho Recruit

      Hello, It would be very useful if we could delete a default career site or change which of our career site is the default. Our Career site was created when there were issues with Zoho Recruit creating English CTA buttons on French Career sites. The only
    • Data not visible in sheet cells

      I'm having an issue where my data is not visible in my sheet cells. If I click on an individual cell, the data does display above in the little "fx" box. But all the boxes in the sheet just look blank. My collaborators do not have this issue. I have checked
    • Finding draft ticket replies

      Is there a way to see all tickets which have draft replies?
    • PO receive limitations

      It is VERY common to receive more or less that the PO quantity. It's totally ludicrous to limit the maximum receive to the PO quantity! What if the receive is 0.00001 less than the PO quantity - it leaves the PO as "Partially received" The current options are to edit the PO manually before finalizing the receive, an outrageous situation ! Please Zoho guys - this is an infuriating oversight & can be easily resolved by introducing the option as shown in the attached document ......
    • How to view shared mailbox in Outlook

      How to view shared mailbox in Outlook or in another software
    • Document images

      We used to be able to rotate the images but this has now been removed ???
    • Request for Alerts on Workflow and Function Changes.

      I want to get an alert whenever a new workflow or function is added or an existing workflow or function is edited. Is there any way to do that? I need to log all changes whenever updates are made or new ones are added.
    • Why don't we have better integration with Mercado Pago or Pagseguro?

      Currently, the integration between Zoho Commerce and Mercado Pago for Brazil is very poor... Since it is old, it does not include the main payment method in Brazil today, which is PIX. Is there a date for this to finally be launched? There are numerous
    • Why is there no integration with native Brazilian shipping methods?

      Zoho Commerce is a powerful platform for e-commerce, but its lack of integration with native Brazilian shipping solutions is a significant limitation for users in Brazil. Integrating with popular shipping providers like Correios, Frenet, and Kangu would
    • Alert for Back Navigation in Zoho Creator Widgets on Mobile Apps

      In Zoho Creator widgets, when a user navigates back on mobile devices, the data within the widget is reset. This leads to a loss of any unsaved changes or inputs, causing frustration for users. To enhance user experience, we need to implement a confirmation
    • Mapping Zoho Projects into Cliq Channels

      why arent all the Zoho Projects listed from the drop down menu when trying to Map them into Zoho Cliq Channels. The system doesnt allow me to type the name of the project but gives a drop down of a list of projects however it doesnt give me a list of
    • Input GST Reversal for damaged goods

      In our line of business, some items are damaged and we are doing inventory adjustments to remove them from stock. However, as per GST guidelines, there is a specific rule that we have to reverse Input GST availed for such items and needs to be reported
    • Develop and publish a Zoho Recruit extension on the marketplace

      Hi, I'd like to develop a new extension for Zoho Recruit. I've started to use Zoho Developers creating a Zoho CRM extension. But when I try to create a new extension here https://sigma.zoho.com/workspace/testtesttestest/apps/new I d'ont see the option of Zoho Recruit (only CRM, Desk, Projects...). I do see extensions for Zoho Recruit in the marketplace. How would I go about to create one if the option is not available in sigma ? Cheers, Rémi.
    • Tracking new lead response time

      Hi, I have a team of Sales Development Reps, who have a KPI of responding to a lead within 20 mins or less once it hits the system.  I seem to recall that Zoho CRM had the capability to track this in a previous version, but don't see it anywhere.   It's
    • Is there any way to prevent emails from being sent from zoho crm without pressing email opt out?

      When I left my desk yesterday I excitedly thought I had fixed my problem, by making use of the "Inactive" field ... However after contacting the support chat, they have advised to stop emails being sent I need to update the "Email Opt Out" field - which
    • Change work hours per day for employees

      Hello, Is there a way to modify the work hours per day for employees in Zoho projects? This would be helpful for resource allocation to more accurately see when an employee who works 35 hours a week vs 40 hours has a full schedule. Thanks.
    • Record GST Paid for Imported Goods

      In Australia, goods that imported from overseas needs to pay GST per invocied value. In most case, the freight forwader (logistic agent) paid this on behalf of importer (us), and invoice us in together in their freight invocie.  How do we setup a proper
    • Unable to produce monthly P&L reports for previous years

      My company just migrated to Books this year. We have 5+ years financial data and need to generate a monthly P&L for 2019 and a monthly P&L YTD for 2020. The latter is easy, but I'm VERY surprised to learn that default reports in Zoho Books cannot create
    • Bulk Editing Multiple Invoices with Overwriting at time of upload

      Hello, I would like to edit a few 100 invoices. Only the HSN needs to be updated. When I am trying to upload the excel sheet with the data updated, I get an error: The Invoices are skipped as they already exist. I know the invoices exist but I would only
    • Change format of quantity format

      Hi,  I would like to change the qunatity format from 1,00 to 1.  Is this possible?   thanks!
    • Oauth Redirects me to sign in page

      I am developing a postman script for me to securely get my credentials via Zoho Vault. With that, I need to authorize my postman to be able to access Zoho Vault. I am currently on Step 1 in this Zoho Vault | API Reference which redirects me to this guide
    • Here's why you should refrain from using EasyShip

      This is a screen recording which shows EasyShip performance issues. Note well! While we do use the Zoho-to-Easyship integration, the problems are wholly on the EasyShip side. The actual integration of data to EasyShip, and status updates back to Inventory,
    • How can I create a billable expense.?

      Hi, I've a bill of an expenses related to printing and stationary account but it recorded in non-billable expense category. How can I record this expense in billable category. Below is the pathway I've used to record the expense. Purchases. Expenses Click
    • Introducing Sub-Accounts in Zoho Books!

      Hello Everyone, Sub-Accounts is LIVE! Yes, you read it right. The much needed and most requested feature is now live in Zoho Books. The sub-accounts feature in Zoho Books will help you to classify your accounts further which will give you a more detailed view of your accounts while running reports. You can create sub-accounts for the below Accounts: Asset Cost of Goods Sold Expense Liability Fixed Asset Other Asset Other Current Asset Long Term Liability Other Current Liability Other Liability Other
    • How can I insert and update field data of a sub-form without adding data into the main form’s mandatory fields.

      1. I have a main form that contains a sub-form. I need to update the data of the sub-form from a function, but I am unable to do so. How can I achieve this in Zoho Creator? 2. How can I insert data into a sub-form without inserting data into the mandatory
    • How to autorespond for inactive users?

      Hi, we have a few inactive users that we would like to set up an autorespond to the sender telling that the email addresses are no longer active. How can we do that?
    • Next Page