# Step 5: Import ECCN codes, tax groups, and tax types

{% hint style="warning" %}
You need to upload the ECCN codes, tax groups, and tax types and assign them to product families in Salesforce before you update the [Product Sync](https://docs.digitalriver.com/salesforce-b2b/1.0-5/integrating-the-digital-river-salesforce-b2b-commerce-app/step-6.-update-the-product-sync-settings).
{% endhint %}

Note that the ECCN codes, tax groups, and tax types provided in these files do not represent a complete list. However, it's enough to get you started.

{% hint style="info" %}
Download the **Approved-ECCN-Codes.csv** and **TaxGroup\_TaxTypes.csv** and save them to your computer.
{% endhint %}

{% file src="<https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MO3A9JOZ2XutdR8bV3r%2F-MO3AP6CFDav9GTPZ7b-%2FApproved-ECCN-Codes.csv?alt=media&token=84d76e1c-2fdb-4ce2-9c0a-2934833d821a>" %}
Approved-ECCN-Codes.csv
{% endfile %}

{% file src="<https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MO3A9JOZ2XutdR8bV3r%2F-MO3AfnrEuL6jBjzGI8q%2FTaxGroup_TaxTypes.csv?alt=media&token=13d9de56-1873-4b18-8541-95700df651b3>" %}
TaxGroup\_TaxTypes.csv
{% endfile %}

The UploadECCN\_Script and UploadTaxGroup\_Script contain dummy values. You can use the test values or populate them with real values for testing purposes. These files are not used in production. You can use these scripts to test a specific scenario where you need to figure out the tax group, tax type, and ECCN code for a specific product.

{% hint style="info" %}
Download the following ZIP files, extract the UploadECCN\_Script and UploadTaxGroup\_Script files, and save them to your computer.
{% endhint %}

{% file src="<https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MO3AxlUOf_JSCxBa3AS%2F-MO3B60bIj0_YXyvtQGH%2FUploadECCN_Script.zip?alt=media&token=162a6251-f455-4540-bc85-f576ab0344d7>" %}
UploadECCN\_Script.zip
{% endfile %}

{% file src="<https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MO3AxlUOf_JSCxBa3AS%2F-MO3BNqrQt750D1_j1w2%2FUploadTaxgroup_Script.zip?alt=media&token=b72285f4-3d70-49dc-bc4c-2e71576133f8>" %}
UploadTaxgroup\_Script.zip
{% endfile %}

## Step 5a: Import ECCN codes <a href="#step-5a-import-eccn-codes" id="step-5a-import-eccn-codes"></a>

To import the ECCN codes:

1. Click **Setup** ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZhViB6IBBd3jhKU9u%2FSetup.png?alt=media\&token=fac122c1-56eb-430e-9144-9d062c16bc19) and select **Setup** from the dropdown list.
2. Type `data import wizard` in the **Quick Find** field and press **Enter**. \
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZiHIa4iEFvBJb4GaL%2FSeach-for-data-import-wizard.png?alt=media\&token=382d77e7-40ef-4c52-9334-cf2326df4024)​
3. Click **Data Import Wizard**.
4. Scroll down and click **Launch Wizard!** The Launch Wizard appears. \
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZiQCAsp_26b7BRs-O%2FLaunch-Wizard.png?alt=media\&token=3d1013eb-f90e-46cf-b3c1-e6e624d25525)
5. Click the **Custom objects** tab.
6. Scroll down and click **Digital River ECCN Lookups**.
7. Scroll up and click **Add new records**.
8. Locate the `Approved-ECCN-Codes.csv` and drag it to **Drag CSV file here to upload** and drop it.\
   &#x20;![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZpl-EtDmgYmUCLPQO%2FApproved-ECCN-Codes-drop.png?alt=media\&token=a2fe88f9-fecb-4617-b54a-239d266b25dc)
9. Click **Next**. The file has been auto-mapped to existing Salesforce fields.\
   &#x20;![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZproZETclAK6evl_F%2FLaunch-Wizard-2.png?alt=media\&token=0597e5de-c5d1-4975-8ad8-1d4ca3f44b55)
10. Click Map associated with the **"Classification Code"**, select **DR Classification Code**, and then click **Map**. \
    ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZpxkCf3_990oDLPPC%2FClassification-Code.png?alt=media\&token=c0f2b8a5-06d3-4cbc-9f14-0ac8e77de2c6)
11. Click Map associated with the **Description**, select **DR Description**, and then click **Map**.
12. Click Map associated with the **Notes**, select **DR Notes**, and then click **Map**.
13. Click **Next**. \
    ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZqJuPz2hPJjpAo6yU%2FLaunch-Wizard-3.png?alt=media\&token=7e2f414b-c6d0-4e39-8949-914ff90bce28)
14. Review your import information and click **Start Import**. The import should start successfully.\
    &#x20;![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZqV_lARq8HiuCS9OK%2FCongratulations.png?alt=media\&token=e854b23d-c8ce-4f37-b28f-0c0c06cfe0ff)
15. Click **OK**. When the import completes, you will receive an email.

## Step 5b: Import tax groups and tax types <a href="#step-5b-import-tax-groups-and-tax-types" id="step-5b-import-tax-groups-and-tax-types"></a>

To import tax groups and tax types:

1. Click **Data Import Wizard**.
2. Click **Launch Wizard!** The Launch Wizard appears. \ <img src="https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZiQCAsp_26b7BRs-O%2FLaunch-Wizard.png?alt=media&#x26;token=3d1013eb-f90e-46cf-b3c1-e6e624d25525" alt="" data-size="original">
3. Click the **Custom objects** tab.
4. Scroll down and click **Digital River Tax code Lookups**.
5. Scroll up and click **Add new records**.
6. Locate the **TaxGroup\_TaxTypes.csv** and drag it to **Drag CSV file here to upload** and drop it.\
   &#x20;![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZr2W8ENP2IJFLJGvi%2FTaxGroup_TaxTypes.png?alt=media\&token=36f16b69-10d9-4b51-8f46-5774854db159)
7. Click **Next**. The file has been auto-mapped to existing Salesforce fields.\
   &#x20;![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZrTYYYUcUqJKjuQAl%2FEdit-Mapping-2.png?alt=media\&token=b2d62bdc-67f1-4272-8a64-9d99ffda747d)
8. Click Map associated with the **TAXGROUP**, select **DR TAXGROUP,** and then click **Map**.\
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZsaSByJlDVUFJ8olC%2FTAXGROUP.png?alt=media\&token=3b34d044-f368-4ed1-820f-9d432a2f04fd)
9. Click Map associated with the **TAXTYPE**, select **DR TAXTYPE**, and then click **Map**.
10. Click Map associated with the **SABRIXCODE**, select **DR SABRIXCODE**, and then click **Map**.
11. Click Map associated with the **UNSPSC**, select **DR UNSPSC**, and then click **Map**.
12. Click **Next**. \
    ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZtNQELh_g0ZDg9CvX%2FStart-Import-2.png?alt=media\&token=4a21969d-3904-42e4-9dfd-c9bd02d8e507)
13. Review your import information and click **Start Import**. The import should start successfully.\
    &#x20;![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZqV_lARq8HiuCS9OK%2FCongratulations.png?alt=media\&token=e854b23d-c8ce-4f37-b28f-0c0c06cfe0ff)
14. Click **OK**. When the import completes, you will receive an email.

## Step 5c: Import the ECCN and tax group scripts <a href="#step-5c-import-the-eccn-and-tax-group-scripts" id="step-5c-import-the-eccn-and-tax-group-scripts"></a>

This step is only required for development purposes. The UploadECCN\_Script and UploadTaxGroup\_Script contain dummy values. You can use the test values or populate them with real values.

{% hint style="info" %}
You need the UploadECCN\_Script and UploadTaxGroup\_Script files for this task.
{% endhint %}

To import the ECCN and Tax group scripts:

1. From Salesforce B2B, click **Setup** ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZhViB6IBBd3jhKU9u%2FSetup.png?alt=media\&token=fac122c1-56eb-430e-9144-9d062c16bc19) and select **Developer Console**. The Developer Console opens.\
   &#x20;![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZtZXnWVsoPtyGVC7y%2F-MSZtoTDB8QXTqyWbBvY%2FDeveloper-Console.png?alt=media\&token=46376194-bf4d-4f40-87f7-e5428113882a)
2. &#x20;Click **Debug** and select **Open Execute Anonymous Window**. The Enter Apex Code dialog appears.\
   &#x20;![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZtZXnWVsoPtyGVC7y%2F-MSZtvq69XqooY8fCgSS%2FOpen-Execute-Anonymous-Window.png?alt=media\&token=d8de1cc4-cbb1-46d1-bc83-efd2c88af30c)
3. Locate and open the **UploadECCN\_Script**.
4. Copy the contents of the **UploadECCN\_Script**, paste it in the **Enter Apex Code** dialog, and click **Execute**. You should see a Success status in the **Logs** tab. \
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZtZXnWVsoPtyGVC7y%2F-MSZu1p5EDPxpf0NCSIf%2FLogs-tab.png?alt=media\&token=16de819b-2b20-405c-87f6-523166243323)
5. Locate and open the **UploadTaxGroup\_Script**.
6. Copy the contents of the **UploadTaxGroup\_Script**, paste it in the **Enter Apex Code** dialog, and click **Execute**. You should see a Success status in the **Logs** tab.

![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZtZXnWVsoPtyGVC7y%2F-MSZuBCbSIamPrr0cF2D%2FLogs-tab-2.png?alt=media\&token=eb76638e-bd07-4acc-8dd1-49f7d9bd10a4)

## Step 5**d**: Assign tax and ECCNs to products <a href="#step-5d-assign-tax-and-eccns-to-products" id="step-5d-assign-tax-and-eccns-to-products"></a>

Assign the tax group, tax type, and ECCNs to products in Salesforce B2B.

{% hint style="warning" %}
Complete this task before you [update the product sync settings](https://app.gitbook.com/@digital-river/s/salesforce-b2b-draft/~/drafts/-MO2tAR6nK2gP6e4wNN0/integrating-the-digital-river-salesforce-b2b-commerce-app/step-6.-update-the-product-sync-settings) with Digital River.
{% endhint %}

1. Click **App Launcher** ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZtZXnWVsoPtyGVC7y%2F-MSZurwL4RG_JC7EnQKF%2FApp-Launcher.png?alt=media\&token=0d598ece-dc3e-4ce1-a877-60b91fb8d523) .
2. Type `CC Products` in the **Search apps and items** field.
3. Click **CC Products**.
4. Under the **Product Name** column, click the link for the product you want to update or click **New** to create a new product. \
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZtZXnWVsoPtyGVC7y%2F-MSZvl-s_7GU73MGGxR0%2FCC-Products-Recently-Viewed.png?alt=media\&token=61842f3d-a822-4a2b-923b-3641b73f80a6)
5. Click **Edit**.
6. Scroll down to **DR ECCN** and provide a valid ECCN value in the **DR ECCN** field. \
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZtZXnWVsoPtyGVC7y%2F-MSZwpUKhgtysOmCRdpk%2FEdit-Product.png?alt=media\&token=ea2e24cb-e9a7-4841-9263-71da662fbe9a)
7. Select the appropriate tax group from the **DR TAXGROUP** dropdown list.
8. Select the appropriate tax type from the **DR TAXTYPE** dropdown list.
9. Click **Save**.
10. Repeat steps 4 through 9 for each additional product.
