Kaizen #1 - Fields in CRM #API

Kaizen #1 - Fields in CRM #API

Hey everyone, welcome to the Zoho CRM Developer Community series. The series is named 'Kaizen', meaning continuous improvement. Through these series of posts, we aim at resolving all the frequently asked questions, common hurdles, and discuss the best practices to be followed by the CRM developer community.

We have five different streams under kaizen. Each one is related to a different stream of CRM developmentAPI v2.0, Functions, SDK, Mobile Development, and Widgets. Every post will be tagged under one of these streams with a hashtag(#). Based on your area of expertise, you can choose to follow any of them. 

So, here is the drill: 
  • We will drop a few eggs of knowledge on a most discussed topic in our developer community forum, and tag it under one of the five streams. 
  • As always, you can keep the questions coming and kick start a productive discussion. 
  • The routine iterates every Friday.
Since this is our first forum post, we decided to start with something basic.

The problem


In ZohoCRM, data is organized into fields (individual chunks of data). For instance, 'First Name', 'Email', and so on. 

As we are all aware, there are multiple field types available in Zoho CRM. Each field type has its limitations on the type and length of data that can be stored in that particular field. It is essential to adhere to these restrictions while inserting, updating, upserting data. If not, it can lead to unsuccessful requests and errors. 

What you will learn from this post


In this post, we are going to walk you through the following, to give you a better idea of different field types in Zoho CRM and their role while inserting, updating, and upserting records. 

  • Different types of fields in Zoho CRM
  • Details about each field type - [ data type, limitations (what type of characters are accepted), size ]
  • Inserting records in Zoho CRM- with emphasis on fields [System-defined mandatory fields for each module]
  • A few use-cases on inserting records in Zoho CRM

a. Different types of fields in Zoho CRM


Fields are used to store data in a structured way in Zoho CRM. 

Based on how the data is stored, they are of two types:


(i) Read-only fields - For these fields, data is system generated. For instance, "created_by", "created_time", "last_activity_time", "modified_by", "modified_time", and so on. Users cannot modify these fields.
 
(ii) Read/Write fields - For these fields, data is set by the user. For instance, "first_name", "last_name", "email", and so on. 

For custom fields and default fields, you can update this property by editing the field-permissions in the set-up screen in UI. You set the fields to be either read-only, read/write, or hidden.

Note that this property cannot be altered for system-defined mandatory and custom mandatory fields.

b. Details about each field type


Just like data types available in multiple programming languages, there are multiple field types in Zoho CRM, allowing you to store different types of data about your customers, users, vendors, and so on. For instance, we have 'Single Line' field type where you can store strings, it allows you to store all the alphanumeric and special characters within a length of 255 characters. 

Apart from default fields, Zoho CRM allows you to create custom fields. Knowing about the field types is essential to pick the right kind of field type for your custom field. For instance, a 'phone' field type would be more appropriate for a custom-field that stores phone numbers than 'single line' type, since phone allows only numeric characters and '+' (to add extensions).

You can find the details about data types and restrictions about each field type in 'modules and fields' section in Zoho CRM UI. Through API, you can get the data type of the fields in a module using meta data API

URL

​​​{{api-domain-URL}}/crm/v2/settings?fields?module={module_API_name}


The following table gives you specific details about each field type in Zoho CRM and their limitations. 
The JSON type and the data type of the field-types are extracted from fields meta data API. 

JSON type - tells in what format the field should be passed in request-body/ will be received in response
data type - tells the type of data that can be stored in a field with that particular field-type


Field-type
Limitations
Example
Single Line
JSON type - string
data type - text
Accepts up to 255 characters.

Accepts alphanumeric and special characters.
"Last_name": "Mike O'Leary"


Multi-Line
JSON type - string
data type - textarea


Small - accepts up to 2000 characters.

Large - accepts up to 32000 characters.


You will not be able to use this field to create custom views, reports or other filters.



Accepts alphanumeric and special characters.




"Description": "This is a sample description"


Email
JSON type - string
data type - email


Accepts valid email IDs.

"Email": "merced@zylker.com"


Phone
JSON type - string
data type - phone


Accepts up to 30 characters. This limit may vary based on the value configured in 'Number of characters allowed' in the properties pop-up of the field, in UI.

Accepts only numeric characters and '+' (to add extensions).

"Phone": "9800000099"


Picklist
JSON type - string
data type - picklist


You can either pass an existing pick list value or add a new one. 


The pick list value accepts all alphanumeric and special characters.

"Industry": "automobile"


Multiselect pick list
JSON type - jsonarray
data type - multiselectpicklist


You can either pass existing pick list values or add a new one.


The pick list value accepts all alphanumeric and special characters.


"Courses opted": [
                               "Analytics", 
                                "Big data"
                                           ]



Date
JSON type - string 
data type - date


Accepts date in yyyy-MM-dd format.

"Date": "2019-08-28"


Date/time
JSON type - string
data type - datetime



Accepts date and time in yyyy-MM-ddTHH:mm:ss±HH:mm
ISO 8601 format.


"Date_Time": "2019-08-28T20:32:36+05:30"


Number
JSON type - integer
data type - integer


Accepts numbers up to 9 digits. This limit may vary based on the value configured in 'Maximum digits allowed' in the properties pop-up of the field, in UI.

Accepts only numeric values.

"No. of employees": "350"


Currency
JSON type - double
data type - currency


Before decimal point - accepts numbers up to 16 digits.  This limit may vary based on the value configured in 'Maximum digits allowed' in the properties pop-up of the field, in UI.


After decimal point - accepts precision up to 9 digits. This limit may vary based on the value configured in 'Number of decimal paces' in the properties pop-up of the field, in UI.

Accepts only numeric values.

"Annual Revenue": 250000.90


Decimal
JSON type - double
data type - double


Before decimal point - accepts numbers up to 16 digits. This limit may vary based on the value configured in 'Maximum digits allowed' in the properties pop-up of the field, in UI.


After decimal point - accepts precision up to 9 digits. This limit may vary based on the value configured in 'Number of decimal places' in the properties pop-up of the field, in UI.

Accepts only numeric values.

"Decimal_1": 250000.50


Percent
JSON type - double
data type - double


Accepts numbers up to 5 digits.

Accepts only numeric values.

"Percentage": 25


Long integer
JSON type - string
data type - bigint


Accepts numbers up to 18 digits. This limit may vary based on the value configured in 'Maximum digits allowed' in the properties pop-up of the field, in UI.


Accepts only numeric values.

"EAN_Code":"0012345600012"


Checkbox
JSON type - boolean
data type - boolean


Accepts only Boolean values(true,false).

"Email_Opt_Out": true


URL
JSON type - string
data type - website


Accepts valid URLs.

"URL": "https://www.zylker.com"


Lookup
JSON type - jsonobject
data type - lookup


Accepts unique ID of the record, which you can get through get records API.


"Owner":
  {
  "id":"4150868000000623001"
  }



User
data type - userlookup


This is a default look-up field to users in Zoho CRM.


"User":
  {
  "User_Name":"Patricia Boyle",
  "id":"4150868000000623001"
  }




C. Inserting Records in Zoho CRM

Now that we have covered different field types and details about each field type, let us move on to inserting records in Zoho CRM. 

System-defined mandatory fields for each module

While inserting records there are a few system-defined mandatory fields that you need to mention. Inorder to successfully insert records in Zoho CRM, make sure you enter user-defined mandatory fields too.

The following table gives you information about the system-defined mandatory fields and their field type in Zoho CRM:

Module
System-defined mandatory field
Leads
"Last_Name" - Single Line
Contacts
"Last_Name" - Single Line
Accounts
"Account_Name" - Single Line
Deals
"Deal_Name"- Single Line
"Stage" - Picklist
Tasks
"Subject" - Multi Line
Calls
"Subject" - Multi Line
"Call_Type" - Picklist
"Call_Start_Time" - Date/Time
"Call_Duration" - Single Line
Events
"Event_Title"- Single Line
"Start_DateTime" - Date/Time
"End_DateTime" - Date/Time
Products
"Product_Name" - Single Line
Quotes
"Subject"- Single Line
"Product_Details" - Product Line Item
Invoices
"Subject"- Single Line
"Product_Details" - Product Line Item
Campaigns
"Campaign_Name" - Single Line 
Vendors
"Vendor_Name"- Single Line
Price Books
"Price_Book_Name"- Single Line
"Pricing_Details"- JSON Array with "from_range", "to_range", "discount"
Cases
"Case_Origin" - Picklist
"Status"- Picklist
"Subject" - Single Line
Solutions
"Solution_Title"- Single Line
Purchase Orders
"Subject"- Single Line
"Vendor_Name"- Lookup
"Product_Details" - Product Line Item
Sales Orders
"Subject"-  Single Line
"Product_Details" - Product Line Item 


d. A few use-cases on inserting records in Zoho CRM

A few special cases while inserting records in Zoho CRM are as follows:

  • Product Line Item
  • Reminder
  • Repeat
  • Pricing_Details
  • What_ID, Who_ID
  • Participants

Every Zoho CRM API request body to insert, update, or upsert records should be given in the JSON format. To know the format for each of the above mentioned special cases, refer to our API guide.


Next 'Kaizen' - OAuth2.0 and Self Client #API





















    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

                                                                                                          • 🚀 WorkDrive 5.0: Evolving from a file sharing app to an intelligent content management platform: Phase 2

                                                                                                            Hello everyone, WorkDrive's primary focus has always been to provide an intelligent and secure content management platform, simplify collaboration, and be the central repository of files for all Zoho apps. In our previous announcement, we unveiled the
                                                                                                          • Join our live webinar: Explore the WorkDrive TrueSync application!

                                                                                                            Hello everyone, We are thrilled to invite you to a live webinar focused on mastering the WorkDrive TrueSync application. Discover how to seamlessly sync your content between the cloud and your computer, ensuring smooth and efficient file management. Our
                                                                                                          • Creating and managing a Team Folder using WorkDrive TrueSync

                                                                                                            Hello everyone, Are you tired of constantly switching between your Desktop TrueSync app and the WorkDrive web app to create and manage Team Folders? We’ve made things easier for you. You can now create and manage Team Folders directly within the TrueSync
                                                                                                          • Live webinar: Getting the most out of WorkDrive in Zoho Workplace

                                                                                                            Hello everyone, We’re excited to invite you to our upcoming live webinar, where we’ll explore how to maximize your use of WorkDrive as part of the Zoho Workplace bundle. This is a fantastic opportunity to elevate your productivity and streamline your
                                                                                                          • Live webinar: Mastering data migration, organization, and team collaboration

                                                                                                            Hello everyone, We’re excited to invite you to our upcoming live webinar! Discover how to seamlessly migrate your data, optimize file organization, and boost team collaboration using Zoho WorkDrive’s powerful features. This is a fantastic opportunity
                                                                                                          • Edit images seamlessly with WorkDrive's built-in Image Editor

                                                                                                            Are you tired of switching between multiple tools just to make simple edits to your images? We understand the hassle, which is why Zoho WorkDrive now comes with a built-in image editing tool, powered by Zoho Annotator. This tool allows you to edit images
                                                                                                          • Supercharge your email workflow with WorkDrive's add-in for Microsoft Outlook

                                                                                                            Consider this: You’re handling a critical project, and your inbox is packed with important attachments, email threads, and client communications. The back-and-forth routine of downloading files to your computer, uploading them to WorkDrive, and manually
                                                                                                          • Secure and promote your content with Custom Watermarking

                                                                                                            Imagine this: You’re a professional photographer who regularly shares your work online with potential clients and collaborators. Recently, you notice that some of your images have been reposted without any credit or permission. This not only impacts your
                                                                                                          • Live webinar: Explore WorkDrive's seamless integrations with key Zoho apps

                                                                                                            Hello everyone, We’re excited to invite you to our upcoming live webinar, where we'll delve into the seamless integration of WorkDrive with other key Zoho applications! This is a fantastic opportunity to enhance your productivity and streamline your workflows
                                                                                                          • Join us in Singapore for the Zoho WorkDrive User Group meetup!

                                                                                                            Hello, everyone! Exciting news! We'll be hosting an upcoming Zoho WorkDrive user group meetup in the beautiful city of Singapore this November. At this Zoho User Group meetup, we'll guide you through ways to use WorkDrive as a platform and build custom
                                                                                                          • WorkDrive TrueSync now supports ARM64-based Windows devices!

                                                                                                            We’re excited to announce that the Zoho WorkDrive TrueSync app now fully supports Windows devices with ARM64 architecture! Whether you're working on an ARM-based device or an x64 processor, you can now enjoy the same seamless file synchronization experience
                                                                                                          • Live webinar: 2024 recap of Zoho WorkDrive

                                                                                                            Hello everyone, We’re excited to invite you to our year-end live webinar! This session will take you through the transformative features and updates we’ve introduced in Zoho WorkDrive this year, helping you streamline document management like never before.
                                                                                                          • Option to Disable Download for Documents Shared via Permalink

                                                                                                            Dear Zoho Writer Team, Currently, when sharing a Writer document using the regular permalink (Collaborators with external users), there is no option to restrict the ability to download the document. While the external share link allows such restrictions,
                                                                                                          • Live Webinar: Optimizing back-office operations in the manufacturing industry to maximize profitability

                                                                                                            Hello everyone, We’re excited to invite you to our upcoming live webinar on February 6! Discover how Zoho WorkDrive can help manufacturing businesses optimize back-office operations, improve efficiency, and boost profitability. Our product experts will
                                                                                                          • Important update for WorkDrive TrueSync users in China Data Center (CN DC) & Chinese language users in other DCs

                                                                                                            Dear WorkDrive TrueSync users, We recently identified an issue affecting users who have set their WorkDrive TrueSync app language to Chinese (Simplified/Traditional). During the auto-update process, the app would not restart automatically and unexpectedly
                                                                                                          • Live webinar: Streamlining legal operations: Leveraging Zoho WorkDrive for law firm success

                                                                                                            Hello everyone, Managing legal documents across departments and jurisdictions can be complex, but it doesn’t have to be. Join us on March 6 for an exclusive webinar where we’ll show you how Zoho WorkDrive empowers legal teams to stay compliant, organized,
                                                                                                          • Calendar not working

                                                                                                            Are we the only ones. On any browser we cannot click on any of our calendar appointments and get them to open. They just make the browser loop. WE have reached out and have been told they are working on it. The office staff are really stuck. The point
                                                                                                          • [Live Webinar] New in Zoho WorkDrive: AI enhancements, Data Loss Prevention, Version Controls, and more

                                                                                                            Hello everyone, We're excited to bring you another round of powerful updates in Zoho WorkDrive! Join us on May 15 for an exclusive live webinar where we’ll unveil the latest features designed to enhance your team’s productivity, collaboration, and data
                                                                                                          • How to Download a File from Zoho WorkDrive Using a Public Link

                                                                                                            How to Download a File from Zoho WorkDrive Using a Public Link If you're working with Zoho WorkDrive and want to download a file using a public link, here's a simple method to do so using API or a basic script. This approach helps developers or teams
                                                                                                          • WorkDrive TrueSync for macOS 26 (Tahoe) Beta

                                                                                                            Hello everyone, With Apple unveiling the macOS 26 (Tahoe) Beta, we know many of you are eager to explore the latest features and enhancements. We’re excited to support your enthusiasm! As part of our commitment to delivering seamless cross-platform experiences,
                                                                                                          • domain not verified error

                                                                                                            Hi when i try to upload a video from zoho creator widget to zoho work drive iam getting domain not verified error.I don't know what to do .In zoho api console this is my home page url https://creatorapp.zoho.com/ and this is my redirect url:www.google.com.Iam
                                                                                                          • Live Webinar: Getting Started with Zoho WorkDrive - A Complete Overview

                                                                                                            Hello everyone, We’re excited to invite you to our upcoming live webinar! Discover how to set up your team, bring in your data, and make the most of WorkDrive’s collaboration, organization, AI, and security capabilities. This session is perfect for anyone
                                                                                                          • Calendly One-way sync- Beta Access

                                                                                                            Hello Community, Many of our Zoho Calendar users have expressed their interests in Zoho Calendar and Calendly integration. We've been tightly working on with Calendly team to provide a two-way sync between Calendly and Zoho Calendar. However, there have
                                                                                                          • The year that was at Zoho Calendar 2023- Part 2

                                                                                                            In continuation with our previous post on all the exciting updates and improvements that have shaped Zoho Calendar over the past 12 months, Lets delve into more: Bring your calendars together- Introducing Zoho Calendar and Outlook calendar synchronisation
                                                                                                          • Tip of the week #18: Change the event organizer in Zoho Calendar.

                                                                                                            We cannot always be available to conduct an event when we organise one. In these circumstances, you can use Zoho Calendar to change the event organizer at any moment before the event begins. This way, you can avoid cancelling the event while still taking
                                                                                                          • Tip of the week #20: Create and manage multiple personal calendars.

                                                                                                            Zoho Calendar provides users with the facility to create and manage as many calendars as required. All these calendars can be managed and edited as per user requirements. You can alter the calendar view, make changes to the calendar theme, share the calendar
                                                                                                          • Tip of the week #24: Subscribe to the calendars of a Zoho Calendar user.

                                                                                                            Calendars that are created by Zoho Calendar users can also be added to your Zoho calendar. All public calendars listed by the users will be available when you enter the email address. You can choose the calendar you need to subscribe to. Once the email
                                                                                                          • Tip of the week #26: Import/ Export calendars in Zoho Calendar.

                                                                                                            Any calendar on the web or calendars that you create in any other calendar application can be imported in to Zoho Calendar. This will help you to add the events from the calendars that you import to your Zoho Calendar. You also have the option to export
                                                                                                          • Removing calendar for zoho email group

                                                                                                            How do I make it so that an email group created in Zoho Mail does NOT have a calendar? I have a couple groups for our phone systems voicemails - one for each department. Voicemail recordings are sent to this groups email address so they have access to
                                                                                                          • Tip of the week #27: Edit personal calendars in Zoho Calendar.

                                                                                                            In Zoho Calendar, the personal calendars you create can be edited to make changes you need to make. Edit a Personal Calendar The following changes can be made to the personal calendar by editing it: Calendar title Calendar color Reminders and Description
                                                                                                          • Tip of the week #28: Show/ hide, enable/ disable and empty/ delete your calendars in Zoho Calendar.

                                                                                                            The popularity of online calendars has soared in recent years. It's used both for personal and professional reasons. Calendars have evolved into an effective productivity tool in our lives, from creating events for birthdays and anniversaries to scheduling
                                                                                                          • Tip of the week #30: Share calendars publicly in Zoho Calendar.

                                                                                                            In Zoho Calendar, calendars that are created under My Calendars can be shared publicly. Making your calendar public allows others to view it. When you need to share your calendar with a larger group, public sharing can help. You can restrict others from
                                                                                                          • Tip of the week #31: Share your personal calendars within organization.

                                                                                                            Keep your Organization members aware of what's happening. In Zoho Calendar, you can share your personal calendar with all the members in your organization using the Share with org option.When you enable org sharing for a particular personal calendar,
                                                                                                          • Tip of the Week #33: Appointment scheduler in Zoho Calendar.

                                                                                                            In Zoho Calendar, you can use the Schedule Appointment option to share your appointment request form with the public, allowing people to fill out the form to request an appointment with you. This form can be embedded on your website or blog. Visitors
                                                                                                          • Tip of the Week #34: Embed Calendars using Zoho Calendar

                                                                                                            You can make your calendars public and visible to the general public by embedding them in your websites/blogs using Zoho Calendar. You can use the embed code to add your own calendars to your website's/ blog's HTML code, and the calendar will appear on
                                                                                                          • Tip of the week #35: Migrate to Zoho Calendar from Google Calendar.

                                                                                                            If you are looking to move your Google Calendar events to Zoho Calendar, never worry about missing out the events from your Google Calendar. You can migrate the events from Google Calendar using the export option and import it to Zoho Calendar and manage
                                                                                                          • Tip of the week #36: Migrate to Zoho Calendar from Outlook Calendar.

                                                                                                            If you've been using Outlook calendar and looking to migrate to Zoho Calendar, you can seamlessly export your calendars from Outlook and import them into Zoho Calendar without losing any events, participants, and the reminders set for each event. To migrate
                                                                                                          • Shared calendar issues and duplications

                                                                                                            Apparently there was a calendar update?  Now when I schedule an event for a team member that has shared his calendar with me, the event makes me the organizer and adds the event to my calendar as well.  Previous to this "update" I would scheduled an event
                                                                                                          • Subscribed Calendar

                                                                                                            Hi i have subscribed to a calendar for Holidays in Canada it shows all the holidays perfectly but every one of them has the word Canada before the rest of the name is there a way to remove that word Canada? It takes up a lot of space in the square on
                                                                                                          • The year that was at Zoho Calendar 2023- Part 1

                                                                                                            Hello, amazing community members! Happy new year from all of us here at Zoho Calendar. As we begin the new year, we'd like to thank each and everyone of our community members for your unwavering support and love that you have shown for Zoho Calendar.
                                                                                                          • Next Page