Introduction
This guide outlines the process for linking your Salesforce account with Anrok. This will allow you to automatically synchronize transactions and update sales tax to your Salesforce quotes, orders, and invoices.
Required preliminary steps before integrating Anrok & SalesforceDisable any invoice-posting custom automationsIf you have custom automations that post quotes, orders, invoices, credit notes, or debit notes you should disable these automations during the integration process. This will ensure that no invoices are processed while integrating Anrok & Salesforce.
Turn off existing tax calculations in Salesforce BillingAnrok uses the built-in Tax fields to add tax to Salesforce Billing objects. Therefore, native Salesforce tax calculation must be turned off to avoid unintended interactions with the Anrok tax integration. You will need to take the following steps to disable native tax calculations within Salesforce Billing:
|
Step 1
Install the required Salesforce integration packages
To begin the Anrok and Salesforce integration process, you will need to first install the necessary Salesforce integration packages within your Salesforce organization.
If you are integrating with your production Salesforce account, you can click the provided links to install the following packages:
- Mandatory package for integrating Anrok and Salesforce: Anrok Salesforce Integration. This package must be installed before any other extensions.
- Extension for adding estimated tax into CPQ quotes: Anrok Salesforce CPQ Extension.
- Extension for adding tax into Orders, Invoices, Credit Notes, and Debit Notes within Salesforce Billing: Anrok Salesforce Billing Extension.
If you are integrating with your sandbox Salesforce account, you can click the provided links to install the following packages:
- Mandatory package for integrating Anrok and Salesforce: Anrok Salesforce Integration. This package must be installed before any other extensions.
- Extension for adding estimated tax into CPQ quotes: Anrok Salesforce CPQ Extension.
- Extension for adding tax into Orders, Invoices, Credit Notes, and Debit Notes within Salesforce Billing: Anrok Salesforce Billing Extension.
Step 2
Set Anrok user permissions
Grant Anrok's permission sets to your Salesforce users by navigating to the Permission Sets section within Salesforce.
- In the Salesforce app
, go to Home > Users > Permission Sets.
- Select the Anrok Api User permission set, click Manage Assignment, then click Add Assignment.
- Select the top-left checkbox
to select all Salesforce users, click Next, then click Assign.
- Select the Anrok [extension type] Extension User permission set, click Manage Assignment, then click Add Assignment.
- Replace [extension type] with:
- CPQ if you installed the CPQ extension.
- Billing if you installed the Billing extension.
- Replace [extension type] with:
- Select the top-left checkbox
to select all users, click Next, then click Assign.
- Select the Anrok Integration Admin permission set, click Manage Assignment, then click Add Assignment.
- Select the checkbox
next to your Salesforce admin users, click Next, then click Assign.
Step 3
Add the Anrok custom fields to your object layouts
Revise the layouts for the corresponding Salesforce objects to incorporate the necessary Anrok custom fields. You can find more information on the Anrok custom fields and supported billing objects here.
- In the Salesforce app
, go to Object Manager.
- Select the drop-down button
next to the object you need to modify, then click Edit.
- Select the Page Layouts, select the drop-down button
next to the layout assigned to your users, then click Edit.
- Add the required Anrok custom fields, then click Save.
Step 4
Create a Connected App for Anrok
Create a new Connected App in Salesforce for Anrok by filling in basic information, enabling OAuth configuration, and selecting the appropriate OAuth scopes.
- In the Salesforce app
, go to Home > Apps > App Manager.
- Select New Connected App, click Create a Connected App, then select Continue.
- Under Basic Information, add the following Information:
-
Connected App Name —
Anrok
. -
API Name —
Anrok
. -
Contact Email —
billing-integration-support+salesforce@anrok.com
.
-
Connected App Name —
- Under API (Enable OAuth Settings), click the checkbox
next to Enable OAuth Settings. Then add the following information:
-
Callback URL — enter
https://localhost:3000
. -
Selected OAuth Scopes — Highlight all scopes under Available OAuth Scopes, then click the Add button
.
-
Callback URL — enter
- When you are finished, click Save, then Continue. It will take a few minutes for the Connected App to be created.
Step 5
Connect with your Salesforce account
The first step of integrating with Salesforce will be connecting directly to your Salesforce account within Anrok. During this process, you must align your accounting time zone and provide the credentials associated with your Salesforce account.
Tip
Make sure to use a Salesforce user with read and write permissions on Accounts and all relevant Billing/Quoting objects (and their fields), as Anrok will make REST API requests as that user.
-
In the Anrok app
, go to Data sources. Take me there!
- Select Integrate system, then under Accounting time zone, select the time zone that matches your Salesforce account (or select UTC if you don't know which time zone to select).
- Under Data source, select Salesforce.
- Under Environment, select whether you are connecting your Production or Sandbox salesforce environment.
-
Select the appropriate checkbox(s) for the object types you want to add the tax to. Your options are the following:
- Add estimated tax to Quotes (CPQ)
- Add estimated tax to Orders (Salesforce Billing)
- Add tax to Invoices, Credit Notes, and Debit Notes (Salesforce Billing)
- Click Connect to Salesforce, then sign in with your Salesforce credentials.
-
Once you see "
You are now logged into Salesforce”, click Connect.
Step 6
Add your Salesforce products as product IDs
In Anrok, your Salesforce products will be called product IDsProduct ID
They describe the specific product or service that was sold to your customer. Product IDs are passed to Anrok from your billing system as the product(s) you are including on the invoice.
Each product ID you sell must be mapped to a corresponding tax configuration in Anrok, which signals what taxability ruleset to apply to the product.. These product IDs are the key driver for calculating taxability. It's important that you add your current and previous Salesforce products into Anrok. See What are product IDs?
- Under New products detected, select a corresponding Product type and Tax category for each product detected. See Select a tax configuration.
-
If you'd like to assign a Product type and Tax category to multiple products at once, click the checkbox
next to each product, then select Batch assign.
- When you are finished, scroll down and click Add products.
Step 7
Import your Salesforce transactions
Now that you've assigned all of your product IDsProduct ID
They describe the specific product or service that was sold to your customer. Product IDs are passed to Anrok from your billing system as the product(s) you are including on the invoice.
Each product ID you sell must be mapped to a corresponding tax configuration in Anrok, which signals what taxability ruleset to apply to the product., you can now begin importing your historical transaction from Salesforce into Anrok.
-
Under Select transactions to import, select one of the following options:
- Import all past transactions — all transactions will be imported into Anrok. This will result in a complete picture of your economic nexus exposure.
- Import transactions from a specific date — some past transactions will not be imported into Anrok. This may result in an incomplete picture of your current economic nexus exposure.
- Continue without importing past transactions — none of your historical transactions will be imported into Anrok. This may result in an incomplete picture of your economic nexus exposure.
- Select Import transactions (or Mark as finished depending on your previous selection).
- When your transactions have finished importing, select Mark complete.
Step 8
Set a default product ID (Optional)
If you have an automated workflow that can generate new product IDsProduct ID
They describe the specific product or service that was sold to your customer. Product IDs are passed to Anrok from your billing system as the product(s) you are including on the invoice.
Each product ID you sell must be mapped to a corresponding tax configuration in Anrok, which signals what taxability ruleset to apply to the product. in Salesforce, we recommend creating a default product ID. When a default product ID has been set, Anrok will apply its tax configuration whenever a Salesforce product hasn't been configured into Anrok. See Set up a default Product ID.
-
In the Anrok app
, go to Data sources. Take me there!
-
Under Integration sources, click the Options menu button
next to Salesforce, then select Configure new products.
- Under Default product, click Set default product.
- Select a corresponding Product type and Tax category for each product detected. See Select a tax configuration.
- When you are finished, click Add products.
Step 9
Generate an Anrok API key
To enable Salesforce to send live transaction data to Anrok for tax calculation automatically, you will need to add an Anrok API key to your Salesforce account. As part of the setup, you will need to generate an API key in Anrok.
-
In the Anrok app
, go to Data sources. Take me there!
-
Under Integration sources, click the option menu button
next to Salesforce, then select Manage Anrok API key.
-
Select Generate Anrok API key, then copy
the API key.
- When you are finished, click Done.
Step 10
Add the Anrok API key to Salesforce
Add the Anrok API key into Salesforce by modifying the authentication parameters under Named Credentials.
- In the Salesforce app
, go to Home > Security > Named Credentials.
- Select the External Credentials tab, then under Label, click Anrok API key secret.
-
Under Principals, select the drop-down button
next to Anrok API User, then click Edit.
-
Next to Authentication Parameters, click Add, then enter the following information:
- Name —
ApiKeySecret
. - Value — Enter the Anrok API key.
- Name —
- When you are finished, click Save.
Step 11
Adjust Custom Code settings for Anrok
Modify the Anrok settings under Custom Code in Salesforce to enable webhooks for Accounts and the selected object types.
- In the Salesforce app
, go to Home > Custom Code > Custom Settings.
- Next to Anrok Settings, select Manage, then click New.
- Under Anrok Settings Information, click the checkbox next to Webhooks for Accounts and for each object type you selected in the Anrok setup (e.g., Quotes, Orders, Invoices).
- When you are finished, click Save.
Step 12
Add VAT IDs to your customer profiles
Adding a VAT ID to your customer records will be essential for tracking international economic nexus exposure. Once a VAT ID has been added, Anrok can use your customer's VAT ID to verify an invoice's taxability in a given country/region.
- In the Salesforce app
, go to Object Manager.
- Select the Account object, then click the Page Layouts tab.
- Next to the applicable page layout, select the drop-down button
, then click Edit.
- Add the Tax ID Anrok custom field, then click Save.