Kaizen #52 - Currencies #API

Kaizen #52 - Currencies #API

Hello everyone!
Welcome back to another post in the Kaizen series!
This week, we will discuss Multi-currency in Zoho CRM.

What will you learn from this post? 
  1. Multi-currency in Zoho CRM
  2. Managing multiple currencies via Zoho CRM API
    • Enabling multi-currency for your organization
    • Retrieve currency details
    • Add new currencies to your organization
    • Update currencies
  3. Multi-currency and Inventory modules in Zoho CRM
1. Multi-currency in Zoho CRM
Multi-currency support in Zoho CRM lets you carry out business transactions with multiple currencies in the global marketplace.
As the Administrator, you can activate this feature by adding the home currency. Once the multi-currency is activated, it cannot be deactivated. To know more about the multi-currency feature, click here.

Pre-requisite
Only the users who have subscribed to the Enterprise or Ultimate editions can access this feature.

Before you start using the multi-currency feature, you must enable it for your organization.

Note: 
The oauth scopes required to access currencies API: 
ZohoCRM.settings.currencies.{operation_type}

Possible operation types
READ - Get currencies data
UPDATE - Update currencies data
CREATE - Add currencies

2. Managing multiple currencies via Zoho CRM API

2a. Enabling multi-currency for your organization

Request URL: {{api-domain}}/crm/v2/org/currencies/actions/enable
Request Method: POST

Sample Input
{
    "base_currency": {
        "format": {
            "decimal_separator": "Period",
            "thousand_separator": "Comma",
            "decimal_places": "2"
        },
        "prefix_symbol": true,
        "name": "Indian Rupee - INR",
        "iso_code": "INR",
        "symbol": "₹",
        "exchange_rate": "50",
    }
}

Input JSON
Key
Description
prefix_symbol
Boolean, Optional
Represents the position of the ISO code in the currency.
true: Display ISO code before the currency value.
false: Display ISO code after the currency value.
name
String, Mandatory
Represents the name of the currency.
iso_code
String, Mandatory
Represents the ISO code of the currency. You can get the available ISO codes from CRM UI. Go to Setup > Company Details > Under Currencies tab > Click Add. You will get the list of currencies available along with their respective ISO codes. 
symbol
String, Mandatory
Represents the symbol of the currency.
exchange_rate
String, Mandatory
Represents the rate at which the currency has to be exchanged for home currency.
is_active
Boolean, Optional
Represents the status of the currency.
true: The currency is active. This is the default value. 
false: The currency is inactive.

The "format" key
The following table represents the keys in "format" JSON object. It is a mandatory key.

Key
Description
decimal_separator
String, Mandatory
The decimal separator separates the integer part of the currency from its fractional part. It can be a Period or Comma, depending on the currency.
thousand_separator
String, Mandatory
The thousand separator separates groups of thousands in a currency. It can be a Period, Comma, or Space, depending on the currency.
decimal_places
Integer, Mandatory
Represents the number of decimal places allowed for the currency. It can be 0, 2, or 3.

Sample Response



Request URL: {{api-domain}}crm/v2/org/currencies
Request URL to get a specific currency: {{api-domain}}crm/v2/org/currencies/{currency_id}

Request Method: GET

Sample Response to get all the Currencies of an Organization:


2c. Add new currencies to your organization

Request URL: {{api-domain}}/crm/v2/org/currencies
Request Method: POST

Sample Input
{
  "currencies": [
    {
      "format": {
        "decimal_separator": "Period",
        "thousand_separator": "Comma",
        "decimal_places": "2"
      },
      "prefix_symbol": true,
      "name": "Saudi Riyal - SAR",
      "iso_code": "SAR",
      "symbol": "SR",
      "exchange_rate": "1.0000000",
      "is_active": true
    }
  ]
}

Sample Response



You can update all the properties of a currency except the name and ISO code. It is mandatory to specify the unique ID of the currency. You can specify it either in the request body or the request URL.

Request URL to update home currency:
{{api-domain}}/crm/v2/org/currencies/actions/enable

Request URL to update currencies other than home currency:
{{api-domain}}/crm/v2/org/currencies

Request URL to update a specific currency:
{{api-domain}}/crm/v2/org/currencies/{currency_ID}

Request Method: PUT

Sample Response to update home currency:


Sample Response to update currencies other than home currency:


Until now, we discussed how to manage currencies for your organization. Next, let us see how to use currencies when you add/update records in inventory modules (Quotes, Sales Orders, Purchase Orders, Invoices, and Vendors) in Zoho CRM.

For other inventory modules like Products and Price Books, the rate will be considered in home currency.

3. Multi-currency and Inventory Modules

You must add the ISO code of the currency in the "Currency" key in request JSON. It applies to adding/updating/upserting records in the inventory modules.

3a. Adding a currency when you create a Quote

Request URL: {{api-domain}}/crm/v2/Quotes
Request Method: POST

Sample Input
{
    "data": [
        {
            "Currency": "SAR",
            "Subject": "Sample Quote2",
            "Account_Name": {
                "name": "Zylker",
                "id": "575465000000657030"
            },
            "Product_Details": [
                {
                    "product": 575465000000653001,
                    "quantity": 10
                }
            ]
        }
    ]
}

Sample Output


We hope you found this post useful.

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

    Access your files securely from anywhere

        Zoho Developer Community







                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns 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