Kaizen #28 - Use cases related to Record Owner

Kaizen #28 - Use cases related to Record Owner

Hello everyone!
Welcome back to another week of Kaizen!
In this post, we will discuss a few use cases related to the Record Owner field.

Who is a record owner?
A record owner is a user of a CRM org who owns a record in a module. Any other user could have also created or owned this record, previously.

This "owner" is a lookup field that points to the resource Users. Therefore, when you use this field, it must always be a JSON object in your input.

The following are a few use cases related to the record owner field:
  1. Assigning a lead owner while inserting a record
  2. Updating the lead owner
  3. Automatically changing the record owner

1. Assigning a lead owner while inserting a record
You can use the Insert Records API to insert a record and assign that record to a user simultaneously. 

Details required
      a. Record ID of the owner you want to assign the record to.
     b. API Name and field type of the owner field to use in the input.

a. Record ID of the Owner
To assign an owner to a record, you must know the ID of the owner.
Make a GET Users API call to fetch the list of all users in your org.

Request URL: {{api-domain}}/crm/v2/users
Request method: GET

Here is a snippet of the response.



The "id" key represents the unique ID of the user record.

b. API Name and field type of the owner field to use in the input
API Name
You can find the API name of the owner field in two ways

i.  From the UI
     1. Go to Setup > Developer Space > APIs > API Names > Choose the module.
     2. For Leads, the API Name of the Lead Owner field is Owner.
      

ii. Through API
      1. Make a GET Fields Metadata API call to the desired module.
      2. Search for the field label Lead Owner in the response.
      3. The value of the key api_name represents the API Name of the Lead Owner field.
      4. The value of the key json_type represents the type of the JSON input you must pass for that field.
      Here, the Lead Owner field accepts data as a JSON object.
      

Now that we have the required details, let us see how to construct the input body to insert a lead and assign the owner of that lead record.
Last_Name is the system-defined mandatory field in the Leads module.
Owner is a JSON Object.

Request URL: {{api-domain}}/crm/v2/Leads
Request method: POST

Sample Input

{
 "data": [
  {
 
  "Last_Name": "Kaizen #28",
  "Email": "newcrmapi1@abc.com",
  "Owner":{
  "id":"3652397000000281001"//Record ID of the user from the GET Users API
  }
  }
 ]
}

Here is the response.



Let us now GET the Lead we just created to check the Owner.

Request URL: {{api-domain))/crm/v2/Leads/3652397000002043003
Request method: GET

Here is the response.



As you can see, the Lead is assigned to the owner.

Note
If you do not specify the owner, the system assigns the current user as the owner of the record.

2. Updating the record owner
You can use the Update Records API to update the owner of multiple records, or the Update a Specific Record API to update the owner of a single record.

As discussed in the above section, the Owner field is a JSON object.

Here is a sample input.


{
    "data": [
        {
            "Owner": {
                "id": "3652397000000186017"//Record ID of the new owner
            }
        }
    ]
}


3. Automatically changing the Record Owner
In CRM, while record creation, the system assigns the current user as the owner of a record, by default. If you want to assign leads to other owners automatically without the need to pass the Owner details in the API, you can write a custom function to achieve the same.

Your custom function must have the logic to assign owners to records based on the desired criteria.
Therefore, whenever a lead is created in CRM, it must trigger the custom function that assigns the lead to the right owner.

Round Robin assignment is one of the solutions to this.



We hope you found this post useful. Let us know your thoughts in the comment section, or write to us at support@zohocrm.com.

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



                                                          • 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


                                                          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 Writer

                                                                                            Get Started. Write Away!

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

                                                                                              Zoho CRM コンテンツ





                                                                                                Nederlandse Hulpbronnen


                                                                                                    ご検討中の方




                                                                                                          • Recent Topics

                                                                                                          • Ticketbai! en el Pais Vasco

                                                                                                            Hola a todos, En enero de 2.022 se va a implantar en el país vasco un nuevo sistema de facturación, denominado ticketbai!, ¿hay alguna previsión de realizar las adaptaciones en zoho books o zoho invoices? Ignoro la cantidad de clientes que tienen estas
                                                                                                          • Zoho CRM mobile app feature update: home page widgets, field tooltips and user image upload

                                                                                                            Hello everyone! Your business doesn't pause when you're on the move, and neither should your CRM. That's why in our latest update, we've introduced a few new features to make your mobile CRM experience smoother and more efficient. Let's take a quick look
                                                                                                          • Zoho CRM Plain Text Template: Line Breaks and Formatting Issue

                                                                                                            Hello, I'm following the instructions to create email templates in Zoho CRM, but I'm having a problem with the plain text version. https://help.zoho.com/portal/en/kb/zoho-sign/integrations/zoho-apps/zoho-crm/articles/zoho-crm-email-templates#Steps_to_create_a_custom_email_template
                                                                                                          • Optimizing Task Handling: Auto-Remove Recurrence for cancelled Tasks.

                                                                                                            Hello Everyone, A Custom function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it. Requirement:
                                                                                                          • Important updates to your connectors

                                                                                                            Hello everyone, Greeting from Zoho Creator! We're excited to announce that we'll be rolling out significant backend updates to Zoho Creator's built-in connectors to enhance security by following the latest frameworks. The existing version of some of the
                                                                                                          • Create, collaborate, and manage agreements with Zoho Sign

                                                                                                            Agreements drive business. We launched Zoho Sign in 2017 as a simple digital signature tool to sign agreements from anywhere, at any time. Over the years, we've learned that most agreements go through last-minute changes before they're signed. Our users
                                                                                                          • Function #25: Automatically generate purchase orders from a sales order

                                                                                                            We kicked off the "Function Fridays" series with the goal of helping you automate your everyday accounting tasks. As we delve into today's post, I'm delighted to announce that we're here to present the 25th custom function in this series. While it is
                                                                                                          • DNS set up

                                                                                                            I want to create an email with my company domain. When I tried to add new record with cloudflare it didn't work. The DNS record can't be manually added. I followed the instruction but still can't add it. Could you help?
                                                                                                          • hiding a topic from all but one segment (or list)

                                                                                                            My organization sends out a number of newsletters using Zoho Campaigns. One of those newsletters is for volunteers. In order to become a volunteer, a person has to first go through our volunteer orientation (training). After that, they can receive newsletters
                                                                                                          • How do I set up this automation correctly?

                                                                                                            When contacts enter my Subscribers list, I want it to reference a custom field to see if it is empty. Then I want it to do two things: If empty: Assign a tag based on a different custom field. If that custom field is empty, assign a different tag. If
                                                                                                          • Function #62: Display associated Quote on Invoice details screen

                                                                                                            Hello everyone! Today, we are sharing a Related List script that makes it easy to view and access the quote from which an invoice was created right from the invoice details screen. This Related List displays the Quote number and Amount, allowing you to
                                                                                                          • Custom confirmation message

                                                                                                            How can I change the message that users see after they submit the booking form? I have to confirm some details before their appointment is officially "confirmed", so I want to change it where it doesn't say their appointment is "confirmed" but rather
                                                                                                          • email forwarding not working

                                                                                                            Your email forwarding service does not work. I received the confirmation email and completed the confirmation, after that nothing and nothing since no matter what I have tried. Shame as everything else was smooth. I spose it's harder to run one of these web based internet mail services than you guys thought!!! can you fix the email forwarding asap PLEASE!
                                                                                                          • Desk x CRM Integration

                                                                                                            Howdy! We currently use SalesIQ but we are considering moving across to Desk as it seems to have more functionality that we want. One of the pulls is the ability for our customers to self serve. But, I might be getting over excited and not actually need
                                                                                                          • Function #53: Transaction Level Profitability for Invoices

                                                                                                            Hello everyone, and welcome back to our series! We have previously provided custom functions for calculating the profitability of a quote and a sales order. There may be instances where the invoice may differ from its corresponding quote or sales order.
                                                                                                          • Issue with Save & Share Link – Works for Others but Not Creator

                                                                                                            I’ve enabled the "Save and Share" feature in Zoho Forms, and it works correctly for all users accessing the public link—except for me (the form creator). Issue Details: When I save and share the link, recipients see a “no permission” error. The form is
                                                                                                          • Save the pdf report from a registration form in a Folder

                                                                                                            Through Zoho Forms I created a registration form with quite a lot of rules to handle different variables (TEAM types, payment in installments, etc.), and the result is pretty good. The automatic PDF that is sent to the respondent upon submission is already
                                                                                                          • zoho forms integration to zoho work drive

                                                                                                            Scenario: A user fills out a Zoho Form, entering details such as email, mobile number, and other required information, and uploads supporting documents like PAN, Aadhaar, etc. Upon submission, the data is available in Zoho Forms Reports. Requirement:
                                                                                                          • Zoho Forms to Zoho CRM Integration failed - can I restart it?

                                                                                                            The integration of Zoho Form to Zoho CRM has failed. Is there a way for me to restart it for the impacted entry?
                                                                                                          • insert an equation, but in document, it shows an image not available.

                                                                                                            I'm new to Zoho writer and used Zoho writer in desktop app version . When I inserted an equation, I got an image not available sign. Any help is appreciated. Thanks, Charles
                                                                                                          • Zoho Desk Android app update - Swipe action customization

                                                                                                            Hello everyone! We have brought in support for the swipe action customization in latest version(v2.9.13) of the Zoho Desk Android app update, enabling you to configure left and right swipe gestures on tickets to carry out the actions swiftly without opening
                                                                                                          • Import KB template OR Export template for zoho desk?

                                                                                                            Greetings. Can you tell me if there is a way to get an EXPORT of my KB articles? OR is there a template you supply for importing KB articles into my zoho desk? I am looking for a method of understanding what fields can be imported, and what their possible
                                                                                                          • XML format to import knowledgebase into Zoho Desk

                                                                                                            Hi, We just started to use Zoho Desk and want to import our knowledgebase from our old support system (Freshdesk) to Zoho Desk. Can anyone give us information about the format of xml file to import? There is no explanation on the related page.
                                                                                                          • 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
                                                                                                          • Arranging Ticket Templates

                                                                                                            Is there any way to arrange our ticket templates? It doesn't look very organised when it's just arranged according to when they were created. We want the list to look more organised, by arranging/grouping them by topics, or even just by alphabetical
                                                                                                          • What they mean with "Portal"?

                                                                                                            I just downloaded this app to take my personal notes on digital art studio because it seemed to me the most comfortable app to do it, I use it very often, what do they mean by “no activity on your portal”? I have about 1 year of work here and I don't
                                                                                                          • Inactive User Auto Response

                                                                                                            We use Zoho One, and we have a couple employees that are no longer with us, but people are still attempting to email them. I'd like an autoresponder to let them no the person is no longer here, and how they can reach us going forward. I saw a similar
                                                                                                          • favorites no longer listed

                                                                                                            Hello, I can no longer navigate to my Favorites from the pulldown at the top of my grid view (see attached screenshot). I wasn't able to find it anywhere! Please help me display my Favorites. Thank you!
                                                                                                          • Notecards Disappeared

                                                                                                            Got a new phone. Downloaded and signed in Zoho Notebook. Not finding the Note cards. Just Empty Note books. Frustrating.
                                                                                                          • Table Errors

                                                                                                            Hello, I'm new to Zoho Notebook and using it on several Mac/Apple devices. My question is regarding tables: Why do they become broken, and how to fix the error without retyping all my data? (Please see the screenshot attached.)
                                                                                                          • Online Calculator with Zoho Forms?

                                                                                                            I'd like to build a custom calculator on my website. Zoho Forms seems to offer all the fields for basic calculations performed live without pressing any "Calculate" buttons. Unfortunately, there is still that "Submit" button at the bottom. There is nothing
                                                                                                          • Zoho Tables instead of Zoho Creator Spreadsheet reports <3

                                                                                                            That would make my day for sure. Zoho Creator is create, but miss data entering as AirTable/Spreadsheet can. Seeing Zoho putting effort in this makes me think maybe one day we could see a similar interface for Zoho Creator spreadsheet reports. B.
                                                                                                          • Notebook Stack

                                                                                                            Hi Everyone I Hope you´re fine, I´m sorry if this idea was posted before (I made a search but I haven´t find anything related). So, Having the possibility of stacking notebooks would be an interesting way to order notebooks that correspond to the same
                                                                                                          • Writing on sketch cards is bugged when zoomed in

                                                                                                            When zoomed in, it writes a noticeable distance above or to the side of where you're actually trying to write. The further you're zoomed in, the more noticeable it is. Zooming is also entirely absent on the desktop version.
                                                                                                          • Swipe between notes on iPhone

                                                                                                            It'd be convenient if I could move from one note to the next in a notebook simply by swiping left to right.
                                                                                                          • Sales IQ chat is not working in signed android apk

                                                                                                            I have integrated ZOHO sales IQ support chat and i have followed each step and its working fine in my development build but when i create signed APK for it. Chat does not work in it and showing awaiting for detail. I previously asked the same query but
                                                                                                          • COQL order by COUNT not working

                                                                                                            Dear community, I am trying to get a list of deal amounts per planner working on it and sorted to get see who has the least amount of deals. For some reason, I am unable to use sort by in combination with a COUNT. My original code was: query = "select
                                                                                                          • I want to duplicate a report and name it something else

                                                                                                            Hi, I have created a report, and now want to reproduce it and call it something else. so that I will end up with TWO separate reports with different titles. Please tell me how do I copy / reproduce a report please
                                                                                                          • Zoho CRM: Sales Rep Professional Certification Program on Coursera

                                                                                                            We are happy to share that we have published the Zoho Sales Representative Professional Certificate in partnership with Coursera, a leading platform for online learning and career development that offers access to courses and degrees from leading universities
                                                                                                          • OS X Notebook quits immediately upon launch

                                                                                                            NoteBook for OS X (Sequoia, but also under Sonoma) always quits immediately upon launch (so I cannot use the "Attach user log" option). I've restarted my MacBook but the problem persists. If it helps, attached is a diagnostic report from Library>Log
                                                                                                          • Next Page