Kaizen #68 - Scoring Rules APIs[Part 1]

Kaizen #68 - Scoring Rules APIs[Part 1]

Hello everyone!
Welcome to another week of Kaizen!
This week we will discuss the Scoring Rules APIs.

What are scoring rules?

You may have different strategies to engage with customers, make their journeys successful in your business, and to convert them to potentials soon.
Scoring each lead based on certain criteria helps you determine who is likely to become a valuable potential.
These criteria or rules are called scoring rules.

When should you use scoring rules?

  • When there are multiple decision makers. In a B2B model where the sales cycle in the business model is long, it is important to have scoring rules for every touchpoint so that you can identify/track the deals with the highest conversion potential and move these deals quickly down the funnel.
  • In a multi-product and cross-selling business, you need to score leads based on the different products they are interested in, and then engage them in cross-products.
  • When you have multiple customer touchpoints. For example, your business may use strategies such as email campaigns, surveys, webinars, training sessions etc. Scoring the customers separately for each touchpoint gives you a more detailed insight into their interests and decide the best engagement strategy.
Note
  • You can configure scoring rules for Leads, Accounts, Contacts, Deals, and custom modules.
  • Scoring rules are layout-specific and each layout can have up to five rules.
For more details, refer to this help page.

Let us now understand how to configure a scoring rule, update, delete, and execute a scoring rule through APIs. 
Consider that you have configured Emails to use email insights and have integrated with Zoho Campaigns, Telephony, and Zoho Survey. You want to score the leads based on their responses to these touchpoints, besides scoring them based on their position in the company. 
Here is an example of how you can score based on the various touchpoints:
  • 10 points for opening an email
  • -5 when the email bounces
  • 10 points for responding to a survey
  • 10 points for opening a campaign
  • -10 for not responding to calls
  • 10 points when the Position is Decision Maker or Regional Manager
Here, scoring based on the custom picklist field "Position" is the field rule, while scoring based on the integration and insights is called the signal rule. 
Let us see how to achieve this through the Scoring rules API.

Create a Scoring Rule

Request URL: {api-domain}/crm/v4/settings/automation/scoring_rules
Request Method: POST
Scope: ZohoCRM.settings.scoring_rules.ALL/CREATE
Supported Modules: Leads, Contacts, Accounts, Deals, and custom

Sample Input

{
    "scoring_rules": [
        {
            "name": "Rule 2",
            "description": "Rule for Module Leads",
            "module": {
                "api_name": "Leads",
                "id": "3652397000000002175"
            },
            "layout": {
                "api_name": "Standard",
                "id": "3652397000000091055"
            },
            "active": false,
            "field_rules": [
                {
                    "score": 10,
                    "criteria": {
                        "group_operator": "OR",
                        "group": [
                            {
                                "field": {
                                    "api_name": "Position"
                                },
                                "comparator": "equal",
                                "value": "Regional Manager"
                            },
                            {
                                "field": {
                                    "api_name": "Position"
                                },
                                "comparator": "equal",
                                "value": "Decision Maker"
                            }
                        ]
                    }
                }
            ],
            "signal_rules": [
                {
                    "score": -5,
                    "id": "3652397000010473049",
                    "signal": {
                        "namespace": "EmailInsight_Bounce__s",
                        "id": "3652397000000112025"
                    }
                },
                {
                    "score": -10,
                    "id": "3652397000010473050",
                    "signal": {
                        "namespace": "Telephony_Missed__s",
                        "id": "3652397000000112027"
                    }
                },
                {
                    "score": 10,
                    "id": "3652397000010473051",
                    "signal": {
                        "namespace": "EmailInsight_Open__s",
                        "id": "3652397000000112021"
                    }
                },
                {
                    "score": 10,
                    "id": "3652397000010473052",
                    "signal": {
                        "namespace": "Survey_Responded__s",
                        "id": "3652397000000112029"
                    }
                },
                {
                    "score": 10,
                    "id": "3652397000010473053",
                    "signal": {
                        "namespace": "Campaign_Open__s",
                        "id": "3652397000000112031"
                    }
                }
            ]
        }
    ]
}

Key
Description
name
string, optional
Unique name of the scoring rule. Accepts up to 25 alphanumeric characters.
description
string, optional
Description of the scoring rule. Accepts up to 500 characters.
module
JSON object, mandatory
API name and ID of the module you want to create this rule in. Use the Modules API to get the module's API name and ID.
layout
JSON object, mandatory
The API  name and ID of the layout in the module you want to create the scoring rule on. Use the Layouts Metadata API to get this ID.
active
boolean, optional
Represents if you want to activate the scoring rule right after creation. The default value is true.
field_rules
JSON array, mandatory
The details of the fields and their values based on which you want to score the records.
score - integer - the score you want to assign
criteria - JSON object - the group that contains the field's API names, values and comparators, and the group operator(and, or). 
signal_rules
JSON array, optional
The details of the various signals raised through integrations and insights, and their scores.
score - integer - the score you want to assign
signal - JSON object - the namespace and ID of the signal you want to associate with this scoring rule. Refer to the Get Configured Signals API to get these details.

Update Scoring Rules

Request URL: {api-domain}/crm/v4/settings/automation/scoring_rules/{scoring_rule_ID} or 
{api-domain}/crm/v4/settings/automation/scoring_rules (with rule_id in the input body)
Request Method: PUT
Scope: ZohoCRM.settings.scoring_rules.ALL/UPDATE
Supported Modules: Leads, Contacts, Accounts, Deals, and custom

What can you update through this API?

  • Name, description, and score
  • Add field and signal rules
  • Update or delete field or signal rules
To delete a field or signal rule, include the key _delete with the ID of the rule and the signal, respectively.
Here is an example to delete the email insight bounce signal rule we configured earlier. We have also added another criteria for the field rule.

{
   "scoring_rules":[
      {
         "name":"Rule 8",
         "id":"3652397000010466004",
         "description":"Updated rule",
         "field_rules": [ //new field rule
                {
                    "score": 5,
                    "criteria": {
                        "group_operator": "OR",
                        "group": [
                            {
                                "field": {
                                    "api_name": "Position"
                                },
                                "comparator": "equal",
                                "value": "Regional Manager"
                            },
                            {
                                "field": {
                                    "api_name": "Position"
                                },
                                "comparator": "equal",
                                "value": "Reviewer"
                            }
                        ]
                    }
                }
            ],
         "signal_rules": [ //to delete the email insight bounce signal rule
                {
                    "score": -5,
                    "id": "3652397000010466007",
                    "_delete":null
                }
            ]
      }
   ]
}

Delete Scoring Rules

Request URL: {api-domain}/crm/v4/settings/automation/scoring_rules/{scoring_rule_ID} or 
{api-domain}/crm/v4/settings/automation/scoring_rules?ids=id1,id2..
Request Method: DELETE
Scope: ZohoCRM.settings.scoring_rules.ALL/DELETE
Supported Modules: Leads, Contacts, Accounts, Deals, and custom

Execute Scoring Rule

After creating a scoring rule, you have to execute it to apply the rule to the matching records. The Execute Scoring Rules API allows you to execute the scoring rules by their IDs or the layout ID. 
Request URL: {api-domain}/crm/v3/{module_api_name}/actions/run_scoring_rules
Request Method: PUT
Scope: ZohoCRM.settings.scoring_rules.ALL/UPDATE
Supported Modules: Leads, Contacts, Accounts, Deals, and custom

To execute scoring rules by their IDs

Note that all the scoring rules must be for the same module. You can execute up to 5 rules.

Sample Input
{
    "scoring_rules" : [
        "3652397000010466004",
        "3652397000006074001"
    ]
}

To execute scoring rules in a layout by the layout ID

Sample Input
{
    "layout" : {
            "id" :"3652397000000091055"   
    }
}

We hope you found this post useful. Next week, we will discuss cloning, activating/deactivating a scoring rule, and getting the score of a record from a module.

Write to us at support@zohocrm.com if you have any questions.

Cheers!





    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

                                                                                            Get Started. Write Away!

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

                                                                                              Zoho CRM コンテンツ






                                                                                                Nederlandse Hulpbronnen


                                                                                                    ご検討中の方




                                                                                                          • Recent Topics

                                                                                                          • Customer Portal on Zoho Desk

                                                                                                            Hi, I'd like to know more about the items below I found when setting up the Customer Portal on Zoho Desk. Could someone help me explaining these in details? Especially the 2nd and 3rd point. Thanking you in advance! Permissions Customers can sign up for Customer Portal Customers can view tickets of their organization (contacts) Customers must register to access Customer Portal Display Community in Customer Self Service portal
                                                                                                          • Cliq iOS can't see shared screen

                                                                                                            Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
                                                                                                          • Create custom rollup summary fields in Zoho CRM

                                                                                                            Hello everyone, In Zoho CRM, rollup summary fields have been essential tools for summarizing data across related records and enabling users to gain quick insights without having to jump across modules. Previously, only predefined summary functions were
                                                                                                          • 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
                                                                                                          • Fill Colors

                                                                                                            Hello, Just curious, is it possible to manage the Used and standard colors in the fill drop down menu ? I would like to change/edit them is possible to colors I frequently use. Thanks for you reply, Bruce
                                                                                                          • Integrating Zoho CRM EmbeddedApp SDK with Next.js — Initialization and Data Fetching Issues

                                                                                                            You can get an idea from my code I have given in end: First, I worked on a React project and tried the same thing — it worked. My goal was to import the Zoho script and then load contacts using the Zoho Widget SDK, which was successful in React. Now,
                                                                                                          • ListObjects is recognized by VBA

                                                                                                            Sub addNewRow() Dim ws As Worksheet ' Set your worksheet name Set ws = ThisWorkbook.Sheets("Invoice") ' Set your table name (change "Table1" to your actual table name) ws.ListObjects("InvItems").ListRows.Add End Sub I am getting Unknown function: Li
                                                                                                          • When moments in customer support get "spooky"

                                                                                                            It’s Halloween again! Halloween is celebrated with spooky symbols and meanings based on history and traditions, with each region adding its own special touch. While we were kids, we would dress up in costumes along with friends, attend parties, and enjoy
                                                                                                          • How can I delete duplicate transactions?

                                                                                                            I want to delete the duplicates not simply exclude them. I have duplicates, because I had automatic bank feeds turned on (had to make sure this critical functionality was working before migrating to Zoho). Now when I import my csv's exported from Wave,
                                                                                                          • Enhance Sign CRM integration

                                                                                                            Hello all, I'm working on a custom Deluge script to enhance the integration between Zoho CRM and Sign by using a writer merge template for additional flexibility. I want to replicate the post-sign document integration that exists between CRM and Sign
                                                                                                          • Python - code studio

                                                                                                            Hi, I see the code studio is "coming soon". We have some files that will require some more complex transformation, is this feature far off? It appears to have been released in Zoho Analytics already
                                                                                                          • Quickly send emails and sync conversations with custom email addresses in CRM

                                                                                                            Editions: All editions DCs: All DCs Release plan: This enhancement has been released for customers in all DCs except IN and US. We will be enabling it for IN and US DC customers soon. [Update on 22 May 2024] This enhancement has been released for all
                                                                                                          • Multiple email addresses

                                                                                                            Multiple email addresses: I understand there is the ability to add an additional email field to a contact, but the functionality here needs to be drastically revised. Currently, this second email address does not log under the contact email history, nor is it available as a send address when using the Send Mail button within CRM. We recently migrated from GoldMine. I hate GoldMine, but there is one thing they did well: Email. I suggest copying them. Change the email field to an editable picklist,
                                                                                                          • Work with Contacts who use multiple Emails / Manage obsolete Email addresses without loosing Emails in Context

                                                                                                            Hello List Work with Contacts who use multiple Emails Only after 1 week in using Zoho CRM productively we have contacts which randomly use 2 different email addresses. From the concept I've understood that Zoho CRM  offers two email fields which are recognized internally as such. Email Secondary Email But the email integration seems to check only Email and not Secondary Email and also not other custom fields defined as email type. Although I added the secondary email to a contact CRM created a second
                                                                                                          • Lead to Contact Conversion with multiple email address fields

                                                                                                            We are a B2C business with a strong repeat cycle, and as such it's not uncommon for customers to use multiple email addresses with us. We have both our Contacts & Leads modules set up with 3 email fields. (Primary Email / Secondary Email / Historic Email)
                                                                                                          • ViewID and Zoho Desk API

                                                                                                            I'm looking at the documentation for Listing contacts and it looks like you can filter by ViewID. I assume this is views created in a department or all departments. Is this correct? And if so, how do I find the ViewID for that view? EDIT: I see the view
                                                                                                          • Ability to Link Reported Issues from Zoho Desk to Specific Tasks or Subtasks in Zoho Projects

                                                                                                            Hi Zoho Desk Team, Hope you're doing well. When reporting a bug from Zoho Desk to Zoho Projects, we’ve noticed that it’s currently not possible to select an existing task or subtask to associate the issue with. However, when working directly inside Zoho
                                                                                                          • Automatically Update Ticket Status in Zoho Desk Based on Actions in Zoho Projects

                                                                                                            Hi Zoho Desk Team, Hope you’re doing well. We’re using the Zoho Desk–Zoho Projects integration to manage tasks related to customer tickets, and it works well for linking and tracking progress. However, there are a few important automation capabilities
                                                                                                          • Print Tickets

                                                                                                            We have field engineers who visit customers. We would like the option to print a job sheet with full details of the job and account/contact details.
                                                                                                          • Zoho Desk integration with Power BI

                                                                                                            Hi, I want to be able to create a Power BI report which has live updates of ticket data from zoho desk, is this possile at all? Thanks Jack
                                                                                                          • Ability to Attach Images When Reporting Issues to Zoho Projects from Zoho Desk

                                                                                                            Hi Zoho Desk Team, Hope you’re doing well. We’re using the Zoho Desk–Zoho Projects integration to report bugs directly from support tickets into the Zoho Projects issue tracker. This integration is extremely useful and helps us maintain smooth coordination
                                                                                                          • Ability to Choose Task List and Add Subtasks When Creating Tasks from Zoho Desk

                                                                                                            Hi Zoho Desk Team, Hope you’re doing well. We’re using the Zoho Desk–Zoho Projects integration to seamlessly connect customer tickets with project tasks. While the integration works great overall, we noticed two important limitations that affect our workflow
                                                                                                          • Sync Task Status from Zoho Projects to Zoho Desk

                                                                                                            Hi Zoho Desk Team, Hope you’re doing well. We’re actively using the Zoho Desk–Zoho Projects integration, which helps our support and project teams stay aligned. However, we noticed that when we change a task’s status in Zoho Projects, the change is not
                                                                                                          • Default/Private Departments in Zoho Desk

                                                                                                            1) How does one configure a department to be private? 2) Also, how does one change the default department? 1) On the list of my company's Zoho Departments, I see that we have a default department, but I am unable to choose which department should be default. 2) From the Zoho documentation I see that in order to create a private department, one should uncheck "Display in customer portal" on the Add Department screen. However, is there a way to change this setting after the department has been created?
                                                                                                          • Can we do Image swatches for color variants?

                                                                                                            We want to do something like the attached screenshot on our new zoho store. We need image swatches instead of normal text selection. We want to user to select an image as color option. Is this doable? I don't see any option on zoho backend. Please h
                                                                                                          • Zoho CRM IP Addresses to Whitelist

                                                                                                            We were told to whitelist IP addresses from Zoho CRM.  (CRM, not Zoho Mail.) What is the current list of IP Addresses to whitelist for outbound mail? Is there a website where these IP addresses are published and updated?  Everything I could find is over
                                                                                                          • Color of Text Box Changes

                                                                                                            Sometimes I find the color of text boxes changed to a different color. This seems to happen when I reopen the same slide deck later. In the image that I am attaching, you see that the colors of the whole "virus," the "irology" part of "virology," and
                                                                                                          • The difference between Zoho Marketing Automation and Zoho Campaigns

                                                                                                            Greetings Marketers! This post aims to differentiate between Zoho Marketing Automation and Zoho Campaigns. By the time you get to the end of the post, you will be able to choose a product that objectively suits you. What is Zoho Marketing Automation?
                                                                                                          • How to use Rollup Summary in a Formula Field?

                                                                                                            I created a Rollup Summary (Decimal) field in my module, and it shows values correctly. When I try to reference it in a Formula Field (e.g. ${Deals.Partners_Requested} - ${Deals.Partners_Paid}), I get the error that the field can’t be found. Is it possible
                                                                                                          • Zoho Mail Android app update - View emails shared via Permalink on the app.

                                                                                                            Hello everyone! In the latest version(v2.8.2) of the Zoho Mail Android app update, we have brought in support to access the emails shared via permalink within the app. Earlier, when you click the permalink of an email, you'll be redirected to a mobile
                                                                                                          • Let us view and export the full price books data from CRM

                                                                                                            I quote out of CRM, some of my clients have specialised pricing for specific products - therefore we use Price Books to manage these special prices. I can only see the breakdown of the products listed in the price book and the specialised pricing for
                                                                                                          • Weekly Tips: Manage External Images in Zoho Mail

                                                                                                            When you receive emails every day, whether from clients, newsletters, or services, many of them contain external images that automatically load when you open the message. While this can make emails look more engaging, it can also impact your privacy and
                                                                                                          • How to display Motivator components in Zoho CRM home page ?

                                                                                                            Hello, I created KPI's, games and so but I want to be able to see my KPI's and my tasks at the same time. Is this possible to display Motivator components in Zoho CRM home page ? Has someone any idea ? Thanks for your help.
                                                                                                          • Introducing Record Summary: smarter insights at your fingertips

                                                                                                            Hello everyone, We’re excited to introduce the Record Summary feature. This powerful addition makes use of Zia to simplify how you interact with your CRM data, providing a seamless, consolidated view of critical record information. Scrolling through the
                                                                                                          • Account in Quick View Filter

                                                                                                            I have a report that I often run against a specific Account. Every time, I have to go into the edit menu and change the Advanced Filter. I would prefer to use the Quick View Filter, but it does not allow me to use the one and only field that makes any
                                                                                                          • Unable to confirm Super Admin assignment — confirmation button not working

                                                                                                            I’m trying to change the roles within my organization. I am currently a super admin and would like to add another user as a super admin. When I attempt to confirm the action, a screen appears asking for my password to verify my identity. However, when
                                                                                                          • Delegates should be able to delete expenses

                                                                                                            I understand the data integrity of this request. It would be nice if there was a toggle switch in the Policy setting that would allow a delegate to delete expenses from their managers account. Some managers here never touch their expense reports, and
                                                                                                          • Let's Talk Recruit: Meet Zia, your all-in-one AI assistant (Part-2)

                                                                                                            Welcome back to Let’s Talk Recruit series. In Part 1, we introduced Zia and how AI is reshaping the way recruiters work. This time, we’re taking a closer look at how far Zia has come and how each update continues to simplify your everyday tasks. When
                                                                                                          • Function #9: Copy attachments of Sales Order to Purchase Order on conversion

                                                                                                            This week, we have written a custom function that automatically copies the attachments uploaded for a sales order to the corresponding purchase order after you convert it. Here's how to configure it in your Zoho Books organization. Custom Function: Hit
                                                                                                          • stock

                                                                                                            bom/bse : stock details or price =STOCK(C14;"price") not showing issue is #N/A! kindly resolve this problem
                                                                                                          • Next Page