Kaizen #88 Assignment Rules

Kaizen #88 Assignment Rules

Hello everyone!
This week, we will discuss the use cases of assignment rules in inserting, updating, and upserting records.

What are Assignment Rules?

The effectiveness of sales is closely tied to a sales representative's daily tasks, such as promptly following up with leads and providing quick responses to customers. A crucial aspect of achieving this lies in implementing a well-structured and carefully planned lead assignment process that takes into account the diverse requirements of leads originating from different sources. Manual assignment may not be efficient, as leads should not be assigned randomly, but rather based on specific criteria like regional experience or product knowledge. "Assignment Rules" automates the lead assignment process by applying predefined rules that consider factors such as territory and product interest, thereby saving time and reducing errors.

Advantages of Assignment Rules 

Zoho CRM's Assignment Rule helps you,
  • To filter records based on the given conditions and assign corresponding owners.
  • To implement an automated system, the time taken to assign leads manually/records that meet the defined criteria can be significantly reduced, thereby making the assignment process more efficient.
  • To assign the filtered records to the specific team in your organization so that they act efficiently to convert leads into contacts and increase your business growth at the earliest possible time.

Where can we create assignment rules on the web UI?

To create an assignment rule, go to Zoho CRM > Setup > Automation > Assignment Rules.

List the Assignment Rules

To list the available assignment rules in your organization.

Request URL: {api-domain}/crm/v4/settings/automation/assignment_rules
Request Method: GET

Sample Response

 {
    "assignment_rules": [
        {
            "created_time": "2023-05-10T00:00:00-07:00",
            "modified_time": "2023-05-30T22:10:53-07:00",
            "default_assignee": {
                "name": "Logged in User",
                "id": "${CURRENTUSER}"
            },
            "module": {
                "api_name": "Leads",
                "id": "5725767000000002175"
            },
            "name": "Leads from India",
            "modified_by": {
                "name": "Patricia Boyle",
                "id": "5725767000000411001",
                "zuid": 808233918
            },
            "description": "Leads from India",
            "id": "5725767000000526437", //ID of the rule(Leads from India)
            "created_by": {
                "name": "Patricia Boyle",
                "id": "5725767000000411001",
                "zuid": 808233918
            }
        }
    ]
}

Apply the rule while creating new records using the ID of the corresponding assignment rule.

Assignment rules on records insert 

While inserting records in a module, you need to specify the ID of the assignment rule which you want to execute, in the request body of the API under the json key "lar_id".
 
Request URL: {api-domain}/crm/v4/Leads
Request Method: POST

Sample Input

{
    "data": [
        {
            "Last_Name":"Smith",
            "Country":"India",
            "Company":"A Technology",
            "Email":"smith@aaa.com",
            "Phone":"+91 87654321**"
        },
        {
            "Last_Name": "Shane",
            "Country": "Pakistan",
            "Company":"B Technology",
            "Email":"shane@bbb.com",
            "Phone":"+9230012345**"
        },
        {
            "Last_Name": "Taqi",
            "Country": "Sri Lanka",
            "Company":"C Technology",
            "Email":"taqi@ccc.com",
            "Phone":"+947123456**"
        },
        {
            "Last_Name": "Kane",
            "Country": "USA",
            "Company":"D Technology",
            "Email":"kane@ddd.com",
            "Phone":"+112345678**"
        }
    ],
    "lar_id": "5725767000000526437"
}

Sample Response

{
    "data": [
        {
            "code": "SUCCESS",
            "details": {
                "Modified_Time": "2023-05-31T02:24:11-07:00",
                "Modified_By": {
                    "name": "Patricia Boyle",
                    "id": "5725767000000411001"
                },
                "Created_Time": "2023-05-31T02:24:11-07:00",
                "id": "5725767000000619002",
                "Created_By": {
                    "name": "Patricia Boyle",
                    "id": "5725767000000411001"
                },
                "$approval_state": "approved"
            },
            "message": "record added",
            "status": "success"
        },
        .
        .
        .
        }
    ]
}

Now, we have applied the rule to the new records and assigned them to their respective owner. To verify whether the records have been assigned to the owner specified in the rule, you can make an API request to GET Records API with the ID of the record. Alternatively, you can perform the verification on the web UI.


Assignment Rules on records update

Zoho CRM provides the flexibility to execute an assignment rule while updating records through its Update Records API.
In the sample request, Kane, a lead from the USA, was initially handled by John. However, Kane has now to moved to India, so Lee will become his new owner.
To achieve this, send the assignment rule ID in the 'lar_id' json key of the request body of the API as below.

Request URL : {{api-domain}}/crm/v4/Leads/{record-id}
Request Method: PUT

Note:
It is mandatory to specify the record ID of Kane to update the fields. 

Sample Input

{
    "data": [
        {
            "Last_Name": "Kane",
            "Country": "India",
            "Company":"D Technology",
            "Email":"kane@ddd.com",
            "Phone":"+9188255172**"
        }
    ],
    "lar_id": "5725767000000526437"
}

Sample Response

{

    "data": [

        {

            "code": "SUCCESS",

            "details": {

                "Modified_Time": "2023-05-31T05:46:51-07:00",

                "Modified_By": {

                    "name": "Patricia Boyle",

                    "id": "5725767000000411001"

                },

                "Created_Time": "2023-05-31T03:19:19-07:00",

                "id": "5725767000000619110",  //ID of the record

 

                "Created_By": {

                    "name": "Patricia Boyle",

                    "id": "5725767000000411001"

                }

            },

            "message": "record updated",

            "status": "success"

        }

    ]

}

To ensure that the record owner has been changed, verify the same using GET Records API.

Request URL: {api-domain}/crm/v4/Leads/{record-id}
Request Method: GET

Sample Response

{
    "data": [
        {
            "Owner": {
                "name": "Lee",
                "id": "5725767000000583018",
                "email": "lee@mail.com",
            },
            "Company": "D Technology",
            "Email": "kane@ddd.com",
            .
            .
            .

            "Country": "India",
            "Created_By": {
                "name": "Patricia Boyle",
                "id": "5725767000000411001",
                "email": "patriciaboyle@zoho.com",
            },
           .
           .
           .

            "Phone": "+9188255172**",
            .
            .
            .

        }
    ]
}

Alternatively, you can check the updated changes on the web UI.

Assignment Rules on records Upsert

Apply assignment rules during Upsert Records API.

Request URL : {api-domain}/crm/{version}/{module_api_name}/upsert
Request Method : POST

Sample Input

{
    "data": [
        {
            "First_Name":"James",
            "Description":"Checking Assignment rules",
            "Last_Name": "DJ",
            "Country": "Sri Lanka",
            "Company":"D Technology",
            "Email":"james@mail.com", //system-defined duplicate check field for Leads Module
            "Lead Source":"Cold Call",
            "Phone":"+9188255172",
            "Annual Revenue":"20000"
        }
    ],
    "lar_id": "5725767000000526437"
}

Note:
  • Provide the email (a system-defined mandatory field ) for the Leads module. If the record already exists, the system will check for matching data and update the record. If the record does not exist, a new record will be created.
  • Provide the assignment rule ID that you want to execute while upserting the record.
Sample Response

{
    "data": [
        {
            "code": "SUCCESS",
            "duplicate_field": "Email",
            "action": "insert", //No existing records were found. So, the system created a new record.
            "details": {
                "Modified_Time": "2023-05-31T12:02:32-07:00",
                "Modified_By": {
                    "name": "Patricia Boyle",
                    "id": "5725767000000411001"
                },
                "Created_Time": "2023-05-31T11:57:15-07:00",
                "id": "5725767000000627046", //ID of the record 
                "Created_By": {
                    "name": "Patricia Boyle",
                    "id": "5725767000000411001"
                }
            },
            "message": "record added",
            "status": "success"
        }
    ]
}

Thank you for your time, and we look forward to bring you another insightful guide in next week's Kaizen.
Feel free to post your queries in the comment section below or write to us at support@zohocrm.com 

Cheers!

Further Reading 









    • Sticky Posts

    • Kaizen #197: Frequently Asked Questions on GraphQL APIs

      🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
    • Kaizen #198: Using Client Script for Custom Validation in Blueprint

      Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
    • Celebrating 200 posts of Kaizen! Share your ideas for the milestone post

      Hello Developers, We launched the Kaizen series in 2019 to share helpful content to support your Zoho CRM development journey. Staying true to its spirit—Kaizen Series: Continuous Improvement for Developer Experience—we've shared everything from FAQs
    • Kaizen #193: Creating different fields in Zoho CRM through API

      🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
    • Client Script | Update - Introducing Commands in Client Script!

      Have you ever wished you could trigger Client Script from contexts other than just the supported pages and events? Have you ever wanted to leverage the advantage of Client Script at your finger tip? Discover the power of Client Script - Commands! Commands
    • Recent Topics

    • Weekly Tips : Customize your Compose for a smoother workflow

      You are someone who sends a lot of emails, but half the sections in the composer just get in your way — like fields you never use or sections that clutter the space. You find yourself always hunting for the same few formatting tools, and the layout just
    • Zoho Slowness - Workarounds

      Hi all, We've been having intermittent slowness and Zoho just asks for same stuff each time but never fix it. It usually just goes away on it's own after a couple weeks. Given that speed is a very important thing for companies to be able to keep up with
    • Custom Bulk Select Button

      Zoho CRM offers the ability to select multiple records and invoke a Custom Button This functionality is missing from Recruit Currently we can only add buttons in the detail page and list But we cannot select Multiple Records and invoke a function with
    • Zoho CRM still doesn't let you manage timezones (yearly reminder)

      This is something I have asked repeatedly. I'll ask once again. Suppose that you work in France. Next month you have a trip to Guatemala. You call a contact there, close a meeting, record that meeting in CRM. On the phone, your contact said: "meet me
    • Power of Automation :: Smart Ticket Management Between Zoho Desk and Projects

      Hello Everyone, A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate
    • First day of trying FSM in the field.

      What we found. 1. with out a network connection we were unable to start a service call? 2. if you go to an appointment and then want to add an asset it does not seem possible. 3. disappointed not to be able to actually take a payment from within the app
    • BUG - Google Business Buttons - Add a button to GBP Post

      I am experiencing an issue with the "Add a button" feature when creating posts for my Google Business Profile (GBP) through Zoho Social. When I schedule or publish a GBP post and include a call-to-action button with a specific URL, the post itself publishes
    • Rich text Merge field - Not using font specified in HTML

      I have a rich text merge field in a writer template which is creating a table. I have chosen to use this method instead of a repeat region because I need to specify specific cell background colours which change every time the document is created. The
    • Support for Custom Fonts in Zoho Recruit Career Site and Candidate Portal

      Dear Zoho Recruit Team, I hope you're doing well. We would like to request the ability to use custom fonts in the Zoho Recruit Career Site and Candidate Portal. Currently only the default fonts (Roboto, Lato, and Montserrat) are available. While these
    • CC and/or BCC users in email templates

      I would like the ability to automatically assign a CC and BCC "User (company employee)" into email templates. Specifically, I would like to be able to add the "User who owns the client" as a CC automatically on any interview scheduled or candidate submitted
    • Trying to export a report to Excel via a deluge script

      I have this code from other posts but it gives me an error of improper statement, due to missing ; at end of line or incomplete expression. Tried lots of variations to no avail. openUrl(https://creatorapp.zoho.com/<username>/<app name>/XLSX/#Report:<reportname>,"same
    • Need help to create a attach file api

      https://www.zoho.com/crm/developer/docs/api/v8/upload-attachment.html Please help me to create it... It's not working for while. Do you have some example?
    • Export view via deluge.

      Hi, Is it possible to export a view (as a spreadsheet) via deluge? I would like to be able to export a view as a spreadsheet when a user clicks a button. Thanks     
    • Outdated state in mexico

      Hello Zoho team, the drop down to add the state for customers, when they introduce their state in mexico has a city named “Distrito Federal” that name changed many years ago to “ciudad de mexico”. could you please update this so my clients can find the
    • Possible to generate/download Quote PDF using REST API?

      See title. Is there any way after a quote has been created to export to a PDF using a specified template and then download it? Seems like something that should be doable. Is this not supported in the API v2.0?
    • Creating an invoice to be paid in two installments?

      Hi there, I own a small Photographic Services business and have not been able to find a way to fit my billing system into Zoho, or any other Accounting software. The way my payments work is: 1. Customer pays 50% of total price of service to secure their
    • Bug in allowing the user to buy out of stock items

      Hi i want to allow the user to buy out of stock items, according to the commerce documentation if i disable Restrict "Out of stock" purchases it will, but it doesnt work, so i want to know if it had any relation with zoho inventory, and if theres any
    • Replace Lookup fields ID value with their actual name and adding inormation from subforms

      Hi everyone,  I wanted to see if someone smarter than me has managed to find any solutions to two problems we have. I will explain both below.  To start we are syncing data from Zoho CRM to Zoho Analytics and I will use the Sales Order module when giving
    • Can a Zoho Sites page be embedded into another website (outside Zoho)

      Hi All, We have a request from a client - they'd like to take one of our information pages created in Zoho Sites and embed it into their own website? I was told through an email with Zoho that this was possible >>Thank you for your patience regarding
    • Bug in allowing the user to buy out of stock items

      Hi i want to allow the user to buy out of stock items, according to the commerce documentation if i disable Restrict "Out of stock" purchases it will, but it doesnt work, so i want to know if it had any relation with zoho inventory, and if theres any
    • Transition Criteria Appearing on Blueprint Transitions

      On Monday, Sept. 8th, the Transition criteria started appearing on our Blueprints when users hover over a Transition button. See image. We contacted Zoho support because it's confusing our users (there's really no reason for them to see it), but we haven't
    • Zoho CRM Sales Targets for Individual Salespeople

      Our organistion has salespeople that are allocated to different regions and have different annual sales targets as a result. I am building an CRM analytics dashboard for the sales team, which will display a target meter for the logged in salesperson.
    • Transfer all Related Data to new Account Owner

      Currently when I change the account Owner I only see the option to change only the open deals But I want the new account owner to take over all the related modules and all the deal stages Is it not possible right now? Am I missing something? Do I really
    • Can i connect 2 instagram accounts to 1 brand?

      Can i connect 2 instagram accounts to 1 brand? Or Do i need to create 2 brands for that? also under what subscription package will this apply?
    • How to Calculate MTTR (Mean Time to Resolve)

      We want to calculate MTTR (Mean Time to Resolve) in our Zoho Analytics report under Tickets. Currently, we are using the following fields: Ticket ID Ticket Created Time Ticket Closed Time Ticket On Hold Time We are planning to calculate MTTR (in days)
    • How to export project tasks, including the comments

      Hi, how can I export the project tasks, whereby I can also see the comments associated to a specific task? The use-case is that often we use comments to discuss or update a task related ideas. I would like to export the tasks, where we can also see the
    • Does Zoho Sheet Supports https://n8n.io ?

      Does Zoho Sheet Supports https://n8n.io ? If not, can we take this as an idea and deploy in future please? Thanks
    • Bigin Android app update: User management

      Hello everyone! In the most recent Bigin Android app update, we have brought in support for the 'Users and Controls' section. You can now manage the users in your organization within the mobile app. There are three tabs in the 'Users and Controls' section:
    • Share records with your customers and let them track their statuses in real time.

      Greetings, I hope everyone is doing well! We're excited to introduce the external sharing feature for pipeline records. This new enhancement enables you to share pipeline records with your customers via a shareable link and thereby track the status of
    • Live webinar: Discover Zoho Show: A complete walkthrough

      Hello everyone, We’re excited to invite you to our upcoming live webinar, Discover Zoho Show: A Complete Walkthrough. Whether you’re just getting started with Show or eager to explore advanced capabilities, this session will show you useful tips and features
    • Deal Stage component/widget/whatever it is... event

      Deal Stages I am trying to access the event and value of this component. I can do it by changing the Stage field but users can also change a Deal Stage via this component and I need to be able to capture both values. Clicking on 'Verbal' for instance,
    • Create advanced slideshows with hybrid reports using Zoho Projects Plus

      Are your quarterly meetings coming up? It’s time to pull up metrics, generate reports, and juggle between slides yet again. While this may be easier for smaller projects, large organizations that run multiple projects may experience the pressure when
    • Add an option to disable ZIA suggestions

      Currently, ZIA in Zoho Inventory automatically provides suggestions, such as sending order confirmation emails. However, there is no way to disable this feature. In our case, orders are automatically created by customers, and we’ve built a custom workflow
    • Email Integration - Zoho CRM - OAuth and IMAP

      Hello, We are attempting to integrate our Microsoft 365 email with Zoho CRM. We are using the documentation at Email Configuration for IMAP and POP3 (zoho.com) We use Microsoft 365 and per their recommendations (and requirements) for secure email we have
    • Formula field with IF statement based on picklist field and string output to copy/paste in multi-line field via function

      Hello there, I am working on a formula field based on a 3-item picklist field (i.e. *empty value*, 'Progress payment', 'Letter of credit'). Depending on the picked item, the formula field shall give a specific multi-line string (say 'XXX' in case of 'Progress
    • CRM x WorkDrive: File storage for new CRM signups is now powered by WorkDrive

      Availability Editions: All DCs: All Release plan: Released for new signups in all DCs. It will be enabled for existing users in a phased manner in the upcoming months. Help documentation: Documents in Zoho CRM Manage folders in Documents tab Manage files
    • Zoho CRMの流入元について

      Zoho CRMとZoho formsを連携し、 formsで作成したフォームをサイトに埋め込み運用中です。 UTMパラメータの取得をformsを行い、Zoho CRMの見込み客タブにカスタム項目で反映される状況になっています。 広告に関してはUTMパラメータで取得できているため問題ないのですが、オーガニック流入でフォーム送信の場合も計測したいです。メールやGoogle、Yahoo、directなどの流入元のチャネルが反映されるようにしたいのですが、どのように設定したら良いでしょうか。 また、
    • Error While Sign in on Zoho Work Drive

      Dear Team, I hope this email finds you well. I have recently created a Zoho account and started using it. But while I am trying to log in to Zoho work drive it won't log me in its crashing every time I try it. I have tried it on android app, phone browser
    • Choosing a portal option and the "Unified customer portal"?

      I am trialling Zoho to replace various existing systems, one of which is a customer portal. Our portal allows clients to add and edit bookings, complete forms, manage their subscriptions and edit some CRM info. I am trying to understand how I might best
    • Elevate your CX delivery using CommandCenter 2.0: Simplified builder; seamless orchestration

      Most businesses want to create memorable customer experiences—but they often find it hard to keep them smooth, especially as they grow. To achieve a state of flow across their processes, teams often stitch together a series of automations using Workflow
    • Next Page