Skip to main content
Gainsight Inc.

Tutorial: Rules Engine Multi-Currency Use Cases

Gainsight NXT

This article supports Gainsight NXT, the next evolution of the Customer Success platform. If you are using Gainsight CS Salesforce Edition, you can find supporting documentation by visiting the home page, and selecting CS > Salesforce Edition.

Not sure what your team is using? Click here.

 

Introduction

This tutorial article solves few use cases to understand the Multi-Currency feature in Rules Engine. For more information about the Multi-Currency support in Rules Engine, refer to the Multi-Currency Impact on Rules Engine article from the Additional Resources section.

Use Case 1: Load Opportunity Data to Company Object and Honor Opportunity Currency Code

Using the Load to Company action type, you can load the Opportunity currency data to the target companies ARR and change the company’s currency to Opportunity currency code. 

For example, a Gainsight company (UK region) with a Corporate Currency in GBP is getting sold to the Gainsight (United States), which is having USD as a Corporate Currency. Suppose the opportunity currency is 100 GBP, and the target company's currency is 100 USD. In that case, the source company’s currency data is converted to companies ARR, and the source currency code is honored. Here the Gainsight US ARR is converted to 129.2 GBP. 

Perform the following steps to load the opportunity currency to the company record:

  1. Create a Rule.
  2. In the Setup Rule screen, select the source object as Opportunity, and drop the following fields into the Show field area:
  • Amount. By default, the Opportunity Currency field is also added.
  • Account ID → Account ID
  • Account Name → Account Name

UC1-1.png

  1. Click SAVE.
  2. In the Setup Action screen, Click +ACTION.
  3. In the Action dropdown field, select Load to Company action type.
  4. In the Operation field, select Update.
  5. Set the Honor Source Currency Code switch to True.
  6. In the Field Mappings section, map the following fields:
  • Account ID → SFDC Account ID (SFDC ID), and select Include in Identifiers checkbox.
  • Opportunity Currency →  Currency ISO Code (STRING)
  1. Click SAVE.
    All the opportunity currencies are loaded to the company object with the Opportunity currency code.

  1. Click RUN NOW to execute the rule now or click Schedule to define how frequently and when the rule should run.

Use Case 2: Load Opportunity Data into Company Object and Honor Companies Currency Code

Using the Load to Company action type, you can load the Opportunity currency data to the target company’s ARR and honor the company’s currency. 

For example, a Gainsight company (United States) with a Corporate Currency in USD is getting sold to Gainsight (India), which is having INR as a Corporate Currency. Since Gainsight India can only pay in INR, the target currency must be honored. Suppose the source currency is 100 USD, and the target company's currency is 100 INR. In that case, the source company’s currency data is converted to the target company while honoring its currency code. Here the target Currency code is honored, and the source value is converted to the target’s Currency code (7300 INR). 

Perform the following steps to load the opportunity currency to the company record:

  1. Create a Rule.
  2. In the Setup Rule screen, select the source object as Opportunity, and drop the following fields into the Show field area:
  • Amount. By default, the Opportunity Currency field is also added.
  • Account ID → Account ID
  • Account Name → Account Name

UC2-1.png

  1. Click SAVE.
  2. In the Setup Action screen, Click +ACTION.
  3. In the Action dropdown field, select Load to Company action type.
  4. In the Operation field, select Update.
  5. Set the Honor Source Currency Code switch to False.
  6. In the Field Mappings section, map the following fields:
  • Account ID → SFDC Account ID (SFDC ID), and select Include in Identifiers checkbox.
  • Opportunity Currency →  Currency ISO Code (STRING)
  1. Click SAVE.
    All the opportunity currencies are loaded to the company object with the companies currency code.
  1. Click RUN NOW to execute the rule now or click Schedule to define how frequently and when the rule should run.

Use Case 3: Load Number (without ISO Code) from S3 Data Ingest to Target Company

When the rule is configured with S3 data ingest, which might bring in numbers without ISO code. In such cases, the new value is directly ingested into the target company using the Load to Company action type. Since source ISO code is not present, the target’s Corporate Currency must be considered, and source value is inserted with the target’s corporate currency code.

For example, if 100 values are ingested from an S3 source into the target company without the ISO code and the target company's currency is 1000 USD. Here the target Currency code is honored, and the source value is directly moved to the target’s company along with the Currency Code (100 USD).

Perform the following steps to load the number from S3 data to the company record:

  1. Create a Rule.
  2. In the Setup Rule screen, create a dataset by fetching data from the S3 bucket. For more information on creating a dataset from the S3 bucket, refer to the S3 Dataset Task in Rules Engine article from the Additional Resources section.
  3. In the Setup Action screen, Click +ACTION.
  4. In the Action dropdown field, select Load to Company action type.
  5. In the Operation field, select Update.
  6. Set the Honor Source Currency Code switch to False.
  7. In the Field Mappings section, map the following fields:
  • ARR Number → MRR (CURRENCY)
  • MRR Number →  ARR (CURRENCY)

Note: If the currency of the incoming file is not USD, but say EUR, you can click on add custom field and input currency code EUR and map it to Currency ISO code.

  1. Click SAVE.
    All the numbers from the S3 bucket are loaded to company objects with the company's currency code.

  1. Click RUN NOW to execute the rule now or click Schedule to define how frequently and when the rule should run.

Use case 4: Load Sum of all Opportunities Amount for an Account into Company Object

Using the Load to Company action type, you can load the sum of all Opportunities Amount for an Account into Company Object. Perform the following steps to achieve this use case:

  • Fetch Data from Opportunity Object
  • Create Transformation Task
  • Perform Load to Company action type on Fetch Task
  • Perform Load to Company action type on Transform Task

Fetch Data from Opportunity Object

To fetch data from opportunity object:

  1. Create a Rule.
  2. In the Setup Rule screen, select the source object as Opportunity, and drop the following fields into the Show field area:
  • Amount. By default, the Opportunity Currency field is also added.
  • Account ID → Account ID
  • Account Name → Account Name

UC4-1.png

  1. Click SAVE.

Create Transformation Task

To create transformation task:

  1. In the Setup Rule screen, Click +TASK and select Transformation task.
  2. Select Fetch from Opportunity from the Select Source Object dropdown field.
  3. Drop the Amount field into the Show field area.
  4. Drop the Account Name field into the GroupBy area.
    Note: The Amount field in the Show area changes to SUM of Amount with Corporate Currency Code.
  5. Click SAVE.

Perform Load to Company action type on Fetch Task

To perform Load to Company action type on fetch task:

  1. In the Setup Action screen, Click +ACTION and create action for Fetch from Opportunity task.
  2. In the Action dropdown field, select Load to Company action type.
  3. In the Operation field, select Update.
  4. Set the Honor Source Currency Code switch to True.
  5. In the Field Mappings section, map the following fields:
  • Account ID → SFDC Account ID (SFDC ID), and select Include in Identifiers checkbox.
  • Opportunity Currency →  Currency ISO Code (STRING)
  1. Click SAVE.
    All the opportunity currencies are loaded to the company object with the Opportunity currency code.

Perform Load to Company action type on Transform Task

To perform Load to Company action type on transform task:

  1. Click +ACTION and create action for Sum of Amt transformation task.
  2. In the Action dropdown field, select Load to Company action type.
  3. In the Operation field, select Update.
  4. Set the Honor Source Currency Code switch to False.
  5. In the Field Mappings section, map the following fields:
  • Account ID → SFDC Account ID (SFDC ID), and select Include in Identifiers checkbox.
  • Amount → ARR (Currency)
  • Custom ISO Code (GBP) →  Currency ISO Code (STRING)
  1. Click SAVE.
    Will successfully load the sum of all the accounts’ opportunity amount to opportunities currency into the company object.
  1. Click RUN NOW to execute the rule now or click Schedule to define how frequently and when the rule should run.

Use Case 5: Currency Fields from Multiple SFDC Objects

When syncing data from multiple SFDC objects to Gainsight using a Salesforce connector and rules, Gainsight considers only one currency from one object. For example, while syncing data from Opportunity object (left) having INR as currency and Account object (right) having USD as currency, Gainsight considers only one currency, i.e. INR from Opportunity object which is in the left joint as a base object.

With multicurrency in Gainsight, we can have only a single currency per row. But when syncing data from Rules engine, you can select fields from multiple objects via lookups. Each of these objects can have their own currency. But the output is a single row with a single currency. In these scenarios, Gainsight only picks one currency from the base object. For example, while syncing data from Opportunity object (left) having INR as currency and Account object (right) having USD as currency, Gainsight considers only one currency, i.e. INR from Opportunity object which is in the left joint as a base object.

Use Case 6: Currency ISO Code field in SFDC Fetch Tasks

When a user fetches a currency field from the SFDC source object using Rules, Gainsight automatically fetches the ISO Code associated with the currency field.  If a rule already has ISO code in an SFDC fetch task, review it once to see if you can remove the field and re-add the currency field. 

Note: Manual fetching of ISO Code from an SFDC Source object using Rules (Transform and Joint tasks) is not supported as Gainsight fetches it automatically.

  • Was this article helpful?