# Multicurrency in Salesforce QuickBooks Online Integration

## Integration from Salesforce to QuickBooks Online <a href="#multicurrencyinsalesforcequickbooksonlineintegration-integrationfromsalesforcetoquickbooksonline" id="multicurrencyinsalesforcequickbooksonlineintegration-integrationfromsalesforcetoquickbooksonline"></a>

If multicurrency is enabled in Salesforce and QuickBooks, then we need to make some changes in DBSync settings and mappings to achieve seamless integration with MultiCurrency.

1. Log in to your DBSync account.
2. Ensure that Salesforce and QuickBooks connectors are validated and that you have imported the **Salesforce to QuickBooks Online Order to Cash Integration** template.
3. Open the relevant project to view the available tasks. Select and open the relevant Task. You will see a list of available flows.
4. Click on configure for **Salesforce to QuickBooks Online Transaction.** Replace the reader query in the Advanced Query Builder with the following query and then click on the **Save** button.

{% code overflow="wrap" %}

```
Select 
Opportunity.Id,Opportunity.AVSFQB__Primary_Contact__r.FirstName,Opportunity.AVSFQB__Primary_Contact__r.LastName,Opportunity.Owner.QB_SalesRep_ID__c, Opportunity.AVSFQB__Primary_Contact__r.Email,Opportunity.AVSFQB__QuickBooks_Id__c,Opportunity.AccountId,LastModifiedDate,Opportunity.Account.Id,
Opportunity.Account.CurrencyIsoCode,Opportunity.Account.Name,Opportunity.Account.BillingStreet,Opportunity.Account.BillingCity,
Opportunity.Account.BillingState,Opportunity.Account.BillingPostalCode,Opportunity.Account.BillingCountry,Opportunity.Account.ShippingStreet,
Opportunity.Account.ShippingCity,Opportunity.Account.ShippingState,Opportunity.Account.ShippingPostalCode,Opportunity.Account.ShippingCountry,
Opportunity.Account.Fax,Opportunity.Account.Phone,Name,Description,CloseDate ,(SELECT Quantity,UnitPrice,Description,Opportunity.owner.FirstName,
Opportunity.owner.LastName,Opportunity.Id,Opportunity.CloseDate,PricebookEntry.Name,PricebookEntry.Product2.ProductCode,PricebookEntry.Product2.Name,
PricebookEntry.Product2.Description,PricebookEntry.Product2.Id,PricebookEntry.UnitPrice,PricebookEntry.Product2.AVSFQB__QuickBooks_ItemType__c FROM
OpportunityLineItems) ,Opportunity.Account.AVSFQB__QuickBooks_Id__c,Opportunity.AVSFQB__Generate_Object__c FROM Opportunity where
Opportunity.AVSFQB__Generate_Object__c = 'Invoice'

```

{% endcode %}

5. Open the map of the First Transform & Write under Salesforce to QuickBooks Online Transaction flow.
6. Add the following mapping in the mapping window and click on the **Save & Close** button.

| Notes | = | <p>{</p><p>ADDXML("\<CurrencyRef>"+IF(VALUE("CurrencyIsoCode").equals("CAD"),"CAD",</p><p>IF(VALUE("CurrencyIsoCode").equals("USD"),"USD",</p><p>IF(VALUE("CurrencyIsoCode").equals("AUD"),"AUD",</p><p>IF(VALUE("CurrencyIsoCode").equals("GBP"),"GBP","EUR"))))+"\</CurrencyRef>");</p><p>return "";</p><p>}</p> |
| ----- | - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

7. Now, open the map of the sequence no.2 Rule.
8. Add the following mapping in the mapping window and click on the Save & Close button.

| Notes | = | <p>{</p><p> </p><p>ADDXML("\<CurrencyRef>"+IF(VALUE("CurrencyIsoCode").equals("CAD"),"CAD",</p><p>IF(VALUE("CurrencyIsoCode").equals("USD"),"USD",</p><p>IF(VALUE("CurrencyIsoCode").equals("AUD"),"AUD",</p><p>IF(VALUE("CurrencyIsoCode").equals("GBP"),"GBP","EUR"))))+"\</CurrencyRef>");</p><p> </p><p>return "";</p><p>}</p> |
| ----- | - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

9. Now, open the map of the sequence no. 4 Rule.
10. Add the following mapping in the mapping window and click on the Save & Close button.

```
CurrencyRef = VALUE("CurrencyIsoCode")
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mydbsync.com/cloud-workflow/tutorials/salesforce-and-quickbooks/multicurrency-in-salesforce-quickbooks-online-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
