# Step 8: Set up Digital River fulfillments

## Enabling Digital River fulfillments

When you set up Digital River fulfillments, you will need to [create a profile](#step-7c-create-a-profile-and-fulfillment-integration-user) for a Fulfillment Integration User and [send the OAuth information for that user to Digital River](https://docs.digitalriver.com/salesforce-b2b/2.1.0/integrating-the-digital-river-salesforce-b2b-commerce-app/step-9-set-up-webhooks) to enable fulfillment.&#x20;

{% hint style="info" %}
Digital River must set up the Salesforce B2B Commerce App for Salesforce B2B Commerce under Manage Connected Apps before you can [set up OAuth](#step-7a-create-a-connected-app) for Digital River fulfillments.
{% endhint %}

See the [Appendix](https://docs.digitalriver.com/salesforce-b2b/2.1.0/appendix) for more information about:

* [Fulfillment flow](https://app.gitbook.com/@digital-river/s/salesforce-b2b/~/drafts/-MRazfhnbBY5nfyqbUlx/v/2.0/appendix/fulfillment-and-cancellation-flow#fulfillment-flow)
* [Cancellation flow](https://app.gitbook.com/@digital-river/s/salesforce-b2b/~/drafts/-MRazfhnbBY5nfyqbUlx/v/2.0/appendix/fulfillment-and-cancellation-flow#cancellation-flow-between-salesforce-and-digital-river)
* [Order-level cancellation flow](https://app.gitbook.com/@digital-river/s/salesforce-b2b/~/drafts/-MRazfhnbBY5nfyqbUlx/v/2.0/appendix/fulfillment-and-cancellation-flow#order-level-cancellation-flow)
* [Line-item cancellation flow](https://app.gitbook.com/@digital-river/s/salesforce-b2b/~/drafts/-MRazfhnbBY5nfyqbUlx/v/2.0/appendix/fulfillment-and-cancellation-flow#line-item-level-cancellation-flow)

## Step 8a: Create a connected app <a href="#step-7a-create-a-connected-app" id="step-7a-create-a-connected-app"></a>

To create a connected app for Digital River fulfillments, complete the following steps:

1. Sign in to Salesforce Org.
2. Click **Setup** ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRVqjUXyDtcGbtY0d2o%2F-MRVrAAIGq5kW27ejXGc%2FSetupIcon.png?alt=media\&token=c1023a5b-836d-4eaf-ac9a-a3ca1b560fd5) and select **Setup** from the dropdown list.
3. Type `app manager` in the **Quick Find** field and press **Enter**. \
   ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRKZZjCgeo7g9pY1on%2F-MRRove8sfUv6pQ5-KkL%2Fapp_mgr.png?alt=media\&token=96e4dd0e-126f-4d8c-b962-7c01bfdd45cd)
4. Click **App Manager** in the search results.
5. Click **New Connected App**.
6. Under **Basic Information**, type `DigitalRiver B2B Fulfillment Connector` in the **Connected App Name** field. \
   ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRp0HkZJfbnf8nERPg%2F-MRRrvvChYXUESME3XC-%2FBasicInformation.png?alt=media\&token=bc7300c0-7963-4d73-baa9-c2bf8fb55557)
7. Provide your **API name** and your email address.
8. Select **Enable OAuth Settings**.
9. Under **API (Enable OAuth Settings)**, type `https://` in the **Callback URL** field. ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRrywhstCA8XWwiGRZ%2F-MRRtL-o-R5s3eZUDWkd%2FInstall%20DR%20B2B%20API%20Connector39.png?alt=media\&token=bb2ed7c1-016c-4ba0-80f6-e893596806ba)
10. Add **Access and manage your data (api)** to **Selected OAuth Scopes**. ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRtOU1yhkMp3_Oz_Iy%2F-MRRtXp3TkNUB8CAFd90%2FInstall%20DR%20B2B%20API%20Connector40.png?alt=media\&token=4c82d6ec-d8e1-44ee-aeef-903fc3b41d7d)
11. Select the **Require Secret for Web Server Flow** check box.
12. Click **Save**. Allow 2-10 minutes for your changes to take effect on the server before using the connected app. \
    ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRt_5ITu42bLjMZ3gg%2F-MRRtsIoz3I0LrM8lAdT%2FInstall%20DR%20B2B%20API%20Connector41.jpg?alt=media\&token=9e040a84-dd65-4ea9-a152-c78fbee2c7af)
13. Capture the **Client Id** and **Client Secret** information. They will be used while setting up webhooks for Fulfillment.

## Step 8b: Update Sharing Settings in Client Org <a href="#step-7b-update-sharing-settings-in-client-org" id="step-7b-update-sharing-settings-in-client-org"></a>

To update the Sharing Settings for the fulfillment flow, complete the following steps:

1. From **Setup**, enter `Sharing Settings` in the **Quick Find** field, and then select **Sharing Settings**.
2. Select **CC Order** from the **Manage sharing settings for** dropdown list.
3. Update the **Default Internal Access** to **Public Read/Write**. \
   ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRu0HJHpcqLiZlXHg7%2F-MRRurI4BVHQwjSG8xDo%2FInstall%20DR%20B2B%20API%20Connector42.jpg?alt=media\&token=b6363d21-b9f7-493b-88d8-7a8a0214d6d2)
4. Repeat steps 2-3 for the **CC Invoice** object. \
   ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRu0HJHpcqLiZlXHg7%2F-MRRvDUaG-F1E1B9TWKj%2FInstall%20DR%20B2B%20API%20Connector43.jpg?alt=media\&token=a41b2857-70b3-4ac3-9f94-ca307d2f393d)
5. For the **CC Transaction Payment** object, you must select **Public Read Only** from the **Default Internal Access** dropdown list.&#x20;

<div align="left"><img src="https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRu0HJHpcqLiZlXHg7%2F-MRRvLQFLnXg6r9_g4Vu%2FInstall%20DR%20B2B%20API%20Connector44.jpg?alt=media&#x26;token=5d2a2099-8c88-4671-baa5-9f7f42c95ef9" alt=""></div>

## Step 8c: Create a profile and Fulfillment Integration User <a href="#step-7c-create-a-profile-and-fulfillment-integration-user" id="step-7c-create-a-profile-and-fulfillment-integration-user"></a>

To create a profile and assign it to a Fulfillment Integration User, complete the following steps:

### Create a new profile

1. Click **Setup** ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRVrCYczYwX4IUJfiRd%2F-MRVrNDx79mcY9LvdIea%2FSetupIcon.png?alt=media\&token=48d3ccbc-2ece-494d-9f76-b16b5511fc32) and select **Setup** from the dropdown list.
2. Under **Administration**, expand **Users**, and click **Profiles**. \
   ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRvOyIJwIoqOWcpIhW%2F-MRRvfXjuEAdt1dS4cSK%2FInstall%20DR%20B2B%20API%20Connector45.png?alt=media\&token=01a2ddb2-d8f6-4df9-80e7-ae5b97382ce1)
3. From the Profiles page, click **New** to create a new profile. ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRvgwXebv_c8jAgrKq%2F-MRRvmNIyEvF-q2aB8Ns%2FInstall%20DR%20B2B%20API%20Connector46.png?alt=media\&token=d86e8f81-6d1b-44ba-8e63-41f4da7358d8)
4. Select **Standard User** from the **Existing Profile** dropdown list. ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRvgwXebv_c8jAgrKq%2F-MRRvu3PNWAg_mxyysTL%2FInstall%20DR%20B2B%20API%20Connector47.png?alt=media\&token=b4e0718a-4408-4303-8336-918e55c0c4c5)
5. Type `DRB2B Connector API User` in the **Profile Name** field. You're essentially cloning the Standard User profile to this new profile.
6. Click **Save**.

### Set the password policy for this profile to never expire

1. Under **Administration**, expand **Users**, and click **Profiles**.
2. Click the **DRB2B Connector API User** link under the **Name** column on the Profiles page.
3. Under **System** on the Profiles page, click the **Password Policies** link. ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRw-16Q8ugjRL7cHCN%2F-MRRw7xaFfnRM0461mXI%2FInstall%20DR%20B2B%20API%20Connector48.png?alt=media\&token=1a0e4a90-512a-48ee-8810-f13b77f17a12)
4. Click **Edit**.
5. Select **Never expires** from the **User passwords expire in** dropdown list. ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRw9yGjjvmLrWvyKpN%2F-MRRwFPQz_NcFwotfnsB%2FInstall%20DR%20B2B%20API%20Connector49.jpg?alt=media\&token=aa4973f8-57e8-4752-8478-9870a215b968)
6. Click **Save**.

### Create a Fulfillment Integration User and assign the user to this profile.

1. Under **Administration**, expand **Users**, and click **Profiles**.
2. Click the **DRB2B Connector API User** link under the **Name** column on the Profiles page.
3. Click **Assigned Users**.
4. Click **New User**.
5. Assign a Fulfillment Integration User to this profile, complete the required fields, and click **Save**.

![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRw9yGjjvmLrWvyKpN%2F-MRRwORGiIAym_S9EvIl%2FInstall%20DR%20B2B%20API%20Connector50.jpg?alt=media\&token=211ed715-841d-464a-8d4f-bf86b134d3ed)

## Step 8d: Assign the Fulfillment Integration User to Digital River Salesforce B2B Commerce Fulfillment Permission Set <a href="#step-7d-assign-the-fulfillment-integration-user-to-drb-2-b-fulfillment-permission-set" id="step-7d-assign-the-fulfillment-integration-user-to-drb-2-b-fulfillment-permission-set"></a>

To add the new user to the Digital River Salesforce B2B Commerce App permission set:

1. From Setup, enter `permission sets` in the **Quick Find** field and press **Enter**.
2. Click **Permission Sets**. The Permission Sets page appears.
3. Select the permission set **DRB2B Fulfillment Permission Set**.
4. Click **Manage Assignments**. \
   ![](https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRwRCuigCtLqBvSj3d%2F-MRRwhKoZVUZzkzbnpFB%2FInstall%20DR%20B2B%20API%20Connector51.jpg?alt=media\&token=0b1236c6-c748-4213-aaed-b4d5eea09ec3)
5. Click **Add Assignments** and add the **Fulfillment Integration** user **Digital River** created in [Step 8c Create a profile and Fulfillment Integration User](#step-7c-create-a-profile-and-fulfillment-integration-user) to the permission set.&#x20;

<div align="left"><img src="https://440715884-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MRRwkEvWQnwzCyGidxu%2F-MRRwpsi97JIGhLOXPq8%2FInstall%20DR%20B2B%20API%20Connector52.jpg?alt=media&#x26;token=11bc7844-2ae8-4230-a4ac-f5d87ecbf684" alt=""></div>
