Kaizen #6 - Environments and Domains in Zoho CRM [Part2/2]

Kaizen #6 - Environments and Domains in Zoho CRM [Part2/2]

Hello Everyone!

Welcome to another week of Kaizen. This post is a continuation of Kaizen #5 - Environments and Domains in Zoho CRM [Part1/2].

What you will learn from this post?

If you want to integrate your web application with Zoho CRM, this post will help you understand how to handle multiple domains for your application.

1. Handling multiple domains for web-based clients

1a. Web-Based Clients

As we all know, in a web-based client, your application is used by multiple users from different domains and environments. 



1b. Role of domains while registering client

Zoho CRM is hosted at multiple data centers. Therefore, the URL with which you make API calls also depends on the data center. This makes integration simpler. The following are the different domains available. 

a. Europe (.eu)
b. Australia (.com.au)
c. India (.in)
d. US (.com)
e. China (.com.cn)

While registering your client, use your domain-specific Zoho Accounts URL.


Enabling Multi DC for your web-based client

After registering your client, you can enable Multi DC in the settings tab.

With this option, you can decide users from which domain can access the web application.




You can see in the above screenshot that users from Europe, Australia, and India can access the application. 

Ideally, the client ID remains the same, and the client secret differs from one DC to another. You can also choose to have the same client secret across multiple domains based on your business needs. 



1c. Role of domains while authorizing your web-based client

For web-based clients, you must use the redirection-based code generation. In this method, the users authorize the application, and the application receives the grant token (code) as a parameter in the redirect URI. 

You must make the authorization request using https://accounts.zoho.com for all the domains except China. After the request is successful, the system automatically redirects the users to their corresponding domains.
For CN domain, make the authorization request using https://accounts.zoho.com.cn.

How this works?
You must have a link or a button in your application, when clicked, redirects the users to the following authentication URL:

https://accounts.zoho.com/oauth/v2/auth?scope=ZohoCRM.users.ALL,ZohoCRM.modules.ALL,ZohoCRM.settings.ALL,ZohoCRM.org.ALL&client_id={client_id}&response_type=code&access_type={offline/online}&redirect_uri={redirect_uri}.

  • Based on the user's login details, the system automatically detects the user's domain and uses the domain-specific authentication URL to obtain the grant token (code).


Consider a user from India, who is trying to access the application in the US. Even though the initial authentication was carried out in .com domain, based on the user's login credentials, the system redirects the user to .in domain, as shown in the screenshot. 
  • In this page, the user reviews the data access permissions, and can accept or reject the request.  



When the user clicks Accept
  • The browser redirects the user to the redirect_uri you specified during client registration.  
  • The application gets authorized. The grant token and the user's location are appended as parameters in the redirect_uri.

  • A back-end script from your end needs to store the following details from the above URL.
    • code={grant_token} - This is used to generate access and refresh tokens.
    • location={domain} - This tells you the domain of the user from which you have to make API calls.
When the user clicks Reject
The browser redirects to the redirect URI with the parameter error=access_denied, and your application is denied access to the user's data in Zoho CRM.

Note:
The grant token is valid only for a minute.

Details you have gathered so far:
  • Grant token
  • User's location

1d. Role of domain while generating access and refresh token

From the previous section, you have the user's domain. You must use the domain-specific Zoho Accounts URL to generate the access and refresh tokens. The following are the various domains and their corresponding accounts URLs.



Also, you can make an API call request using https://accounts.zoho.com/oauth/serverinfo, and receive domain details in the response.



  • Use these domain-specific Zoho Accounts URL to generate the access and refresh tokens. 
  • To get the current user details, make the following API call. 
    {{api-domain-URL}}/crm/v2/users?type=CurrentUser
  • You will receive the current user details in the response.



Details you have gathered so far:

  • Grant token
  • User's domain
  • Current user details
  • Accounts domain
  • Access token
  • Refresh token
  • Expires_in

2. Environments in Zoho CRM

In our last post, we discussed different environments in Zoho CRM. 

The user may want to integrate Zoho CRM for any environment(Production, Sandbox, Developer) in the application. You must get this information as input from a page in your application. For instance, you can have a page that lists the available environments, and ask the user to choose one. 

You can then make API calls using the below URLs.


Store these details in your application DB, and use them when you make API calls. For instance,


user_id
access_token
refresh_token
expires_in
domain
accounts_domain
 Environment
694579958
1000.xxxx.446
1000.xxxx.a787
3600
.com
accounts.zoho.com
sandbox
698599774
1000.xxxx.59d
1000.xxxx.a98b
3600
.in
accounts.zoho.in
production
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

If the environment is not specified, all the changes are reflected in the production environment.

We hope you found this post useful. Keep a tab on this series for more exciting topics!

Reach out to us at support@zohocrm.com if you have any questions, or let us know in the comment section.

We will meet you next week with another useful topic. 

Cheers!










    Access your files securely from anywhere







                        Zoho Developer Community





                                              Use cases

                                              Make the most of Zoho Desk with the use cases.

                                               
                                                

                                              eBooks

                                              Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                               
                                                

                                              Videos

                                              Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                               
                                                

                                              Webinar

                                              Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                               
                                                
                                              • Desk Community Learning Series


                                              • Meetups


                                              • Ask the Experts


                                              • Kbase


                                              • Resources


                                              • Glossary


                                              • Desk Marketplace


                                              • MVP Corner




                                                        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

                                                                                                        • Fields of Look up in Custom Modules

                                                                                                          We need to create a custom module in Books for Proforma Invoices Now I created a Custom Module and added a Table and in the table added a lookup field and chose Items Now I want Specific fields of the item such as Tax, Item Cost etc but it only displays
                                                                                                        • Ask the Experts 21: Power up your support game with Zoho Desk Automation

                                                                                                          " In every business, there are tasks to automate, Zoho Desk helps with features that integrate Assignments to manage tickets and teams to align,Macros for quick actions and workflows to streamline Contracts and schedules to hold things tight, Plans run
                                                                                                        • Needs Separate Permissions levels for Record Attachments

                                                                                                          Currently in Zoho Books Record attachments are tied to the general permission level For example if a role don't have the delete permission level they cannot delete the attachment as well If a role doesn't have the edit permission they cannot upload the
                                                                                                        • Getting oauth errors on bigin

                                                                                                          Hi Support, I'm getting oauth errors on bigin even though it works fine with CRM. I created a self client which will add contacts. I gave every permission you could and it still didn't work. What should I do. I might just switch to the standard CRM since
                                                                                                        • Sesión "Ask me anything" Zoho en Español - 26 de junio de 2025, de 14:00 a 17:00 (en español)

                                                                                                          ¡Hola Comunidad! ¿Quieres entender mejor Zoho CRM o Zoho Desk? Nuestros expertos estarán disponibles para responder a todas tus preguntas durante nuestra sesión "Ask me anything". Puedes comentar este artículo y durante tres horas, nuestro equipo estará
                                                                                                        • Customer Addresses cannot be edited/deleted in invoices

                                                                                                          In the invoices we have an option to change the customer address and add a new address Now I dont know why for some reason if we add an address through this field, the address doesn't appear in the customer module We cannot delete the addresses added
                                                                                                        • Assessment Field in Custom View

                                                                                                          Zoho recruit finally added the ability to filter Job Applications by Assessment Answers This is a very valuable addition to the Recruit But this is currently missing from the custom view This should be added to the custom view as well
                                                                                                        • Translation support expanded for Modules, Subforms and Related Lists

                                                                                                          Hello Everyone!   The translation feature enables organizations to translate certain values in their CRM interface into different languages. Previously, the only values that could be translated were picklist values and field names. However, we have extended
                                                                                                        • Truesync for Linux

                                                                                                          Is Truesync available on linux ?
                                                                                                        • Subforms and automation

                                                                                                          If a user updates a field how do we create an automation etc. We have a field for returned parts and i want to get an email when that field is ticked. How please as Zoho tells me no automation on subforms. The Reason- Why having waited for ever for FSM
                                                                                                        • 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.
                                                                                                        • Flex Your Creativity – A New component to Canvas in Zoho CRM

                                                                                                          Hello Everyone We’re excited to introduce Flex, a new component for Canvas in Zoho CRM! Flex is here to give you greater control over how your data is displayed in your layouts. This component enables responsive layouts that adapt across different screen
                                                                                                        • When will Sales Order and Invoice Synchronisation with Zoho CRM be Available?

                                                                                                          When will Sales Orders and Invoices, created in Zoho Books or Inventory be made available in Zoho CRM? John Legg Owner: The Debug Store
                                                                                                        • Feature Requests and enhancements: Subform

                                                                                                          By The Grace of G-D. Hi, It would make it much easier to use if we could have some more features in subforms: More Columns/Fields Set the size of a column Show the subform in Full Page Width Sorting By Column Please consider The above suggestions. T
                                                                                                        • Clone a Module??

                                                                                                          I am giong to repurpose the Vendors module but would like to have a separate but very similar module for another group of contacts called Buyers. I have already repurposed Contacts to Sellers. Is it possible to clone (make a duplicate) module of Vendors
                                                                                                        • Empowered Custom Views: Cross-Module Criteria Now Supported in Zoho CRM

                                                                                                          Hello everyone, We’re excited to introduce cross-module criteria support in custom views! Custom views provide personalized perspectives on your data and that you can save for future use. You can share these views with all users or specific individuals
                                                                                                        • Unapplied AP Credits not showing up on AP Detail Aging

                                                                                                          I am new to using Zoho Books. I was reconciling some accounts and found differences from the GL balance and AP Aging and it came down to unapplied vendor credits. Is there an option to include that on the report, so I can pull a matching AP Aging to the
                                                                                                        • Add Entry and Subform Record from Deluge Scripts

                                                                                                          Hi all,  I would like to know how do I add a new entry and also subform records from a deluge scripts.  I can use the insert into to add a new entry to a form, but how do i insert a collection into the subform of the entry? I am using a deluge script
                                                                                                        • i keep see there is a connetion issue connecting 3rd party api on zoho when using zia

                                                                                                          hi there , i have set up open ai api to zoho zia (copied and pasted to zoho zia) but I keep getting notificaiton "there is a connetion issue connecting 3rd party api on zoho" when using zia on top when click zia and try to type in word there
                                                                                                        • Finding draft ticket replies

                                                                                                          Is there a way to see all tickets which have draft replies?
                                                                                                        • How to apply a tag to a ticket based on the to email address?

                                                                                                          I need to assign a tag to a ticket if the ticket was sent to a specific email address. For example, we have the email accounting[at]company.com forwarding into Zoho Desk. We would like all emails that were sent to this address to be tagged with an Accounting
                                                                                                        • Engineering Change Order Process using Tickets?

                                                                                                          Hi Zoho Community, I'm working with my company to create an Engineering Change Order/Request (ECO/ECR) process where engineers can internally create tickets for changes in a product that must be reviewed, approved and implemented by people or teams in
                                                                                                        • Allow Changing Appointment Status from "Completed" to "No Show" or Other Valid States

                                                                                                          Hi Zoho Bookings Team, We hope you're doing well. We would like to submit a feature request regarding appointment status management in Zoho Bookings. 🎯 Use Case Sometimes, an appointment is mistakenly marked as Completed, but later we realize that the
                                                                                                        • How can I move a ticket from Department A to Department B?

                                                                                                          Hi there, how do I move ticket from Department A to Department B? I went in the ticket and tried to scroll down the menu under the "department" but it won't let me, I am a support admin. Did I do anything wrong? or am I doing it in the wrong place?
                                                                                                        • Validation Rules Trigger on Untouched Fields

                                                                                                          In Zoho Desk, validation rules trigger for ALL fields during an update—even fields that weren't modified in the current edit. This behavior is fundamentally different from Zoho CRM and other Zoho products, where validation rules only apply to fields actually
                                                                                                        • How to work with getFieldNames formdata functions ,Any Examples

                                                                                                          I don't find any example showing usage of getFieldNames. Where do i find .is there any Help documents available
                                                                                                        • Zoho Notifications - Received two notifications for one message and none for the other

                                                                                                          We had a client reply to a ticket twice in one minute. The ticket owner received two emails for the second message but none for the first (which was crucial content and unfortunately was therefore missed). I'm assuming this created a race condition -
                                                                                                        • Can we have Backorder Management ?

                                                                                                          Can we have Backorder Management ?
                                                                                                        • Better integration between Zoho CRM and Zoho Bookings

                                                                                                          I've noticed that when a meeting which was created in Zoho Bookings is updated by a sales person in Zoho CRM, the change is not reflected back into Zoho Bookings. I have raised this with support who advised that meetings created in Bookings need to be
                                                                                                        • What is the difference between "Reply" and "Public Comment" in a ticket?

                                                                                                          Hey, my company is thinking about switching to Zoho Desk but we do not understand the difference between the "Reply" and the "Public Comment" feature. When should we use which? And why? What is the difference between them? Thank you for your help! Kindest
                                                                                                        • Tasks View for Opportunity/Jobs does not indicate "Related To" account

                                                                                                          How can ZoHo be setup so that when a task is created for an Opportunity, the subject automatically lists the underlying account? Right now, it's impossible to link the Account to the task when the task is created from the Job.  Therefore, the open task view is inadequate.  And it's a lot of maintenance to have to manually add the account to the subject...defeating the purpose of "Automated" workflow. 
                                                                                                        • Writing SQL Queries - After Comma Auto Suggesting Column

                                                                                                          When writing SQL Queries, does anyone else get super annoyed that after you type a comma and try to return to a new line it is automatically suggest a new column, so hitting return just inputs this suggested column instead of going to a new line? Anyone
                                                                                                        • can i show alert when i finish running the function?

                                                                                                          how i can show alert inside the custom function or popup notification. when i use alert inside the custom function it show this error Error at line number:  2 'ALERT' task can be used only in on load, on validate and on change actions ​
                                                                                                        • CRM calendar not syncing with Zoho Calendar

                                                                                                          The sync is not happening: This is my Zoho Calendar CalDAV synced with Outlook This is my Zoho CRM Calendar (sadly empty ...) I have enabled CalDAV Access. In Zoho Calendar, I have set up APP Calendar sync like this: What else can I check? Thank
                                                                                                        • Pipeline in Custom Modules

                                                                                                          I love the way the Sales Pipeline looks and functions with reports. I would like to add the save pipeline features and visualization to a custom module, however, I only see that these pipelines are only available for the Deals module. Is there a way to add pipelines to custom modules?
                                                                                                        • Ecommerce integration with prestashop

                                                                                                          Development of campaigns integration with prestahop. When???
                                                                                                        • Cannot associate event with other objects when creating?

                                                                                                          I am attempting to associate an Event with one or more other objects when creating it via the API. According to the API docs, the "Related_To" property is a jsonobject even though the description says "Provide the details about the entities the event
                                                                                                        • Zoho Cliq not working on airplanes

                                                                                                          Hi, My team and I have been having this constant issue of cliq not working when connected to an airplane's wifi. Is there a reason for this? We have tried on different Airlines and it doesn't work on any of them. We need assistance here since we are constantly
                                                                                                        • Departments in Zoho

                                                                                                          I'm trying to set up a department. It looks like Departments have been removed from Zoho One. Is there another option? We have our main account setup, but want to set up a separate small department that can't see our tabs.
                                                                                                        • How to disable subform records dynamically

                                                                                                          Hi Everyone I have a requirement to dynamically disable or hide subform fields based on certain criteria. However, the code I tried didn't work as expected. It either disabled or hid all the fields in all subform records or none at all. What I actually
                                                                                                        • Next Page