LogoLogo
Connectors
Salesforce B2B Commerce App 2.1.0
Salesforce B2B Commerce App 2.1.0
  • Salesforce B2B Commerce App 2.1.0
  • Introduction
    • How it works
    • What's new in version 2.1.0
    • Requirements
  • Integrating the Digital River Salesforce B2B Commerce App
    • Step 1: Install the Digital River App for Salesforce B2B
    • Step 2: Create page labels
    • Step 3: Configure the Salesforce B2B Commerce App
    • Step 4: Add custom Salesforce B2B Commerce App fields to page layouts
    • Step 5: Enable email deliverability
    • Step 6: Import ECCN codes, tax groups, and tax types
    • Step 7. Update the Product Sync settings
    • Step 8: Set up Digital River fulfillments
    • Step 9: Set up webhooks
    • Step 10: Configure CC Admin settings
    • Step 11: Configure landed cost
    • Step 12: Schedule backend jobs
    • Step 13: Manage permission sets
    • Step 14: Configure the Salesforce B2B Commerce app logs
    • Step 15: Test the Digital River Salesforce B2B Commerce app integration
    • Step 16: Override the default App implementation
  • Support
  • Version number
  • Appendix
    • Fulfillment and cancellation flow
    • Issuing refunds
    • Managing regulatory fees
    • Managing subscriptions
    • Salesforce B2B Commerce App logs
    • Uploading tax certificates (US TEMS)
    • VAT invoices
Powered by GitBook
On this page
  • Set up webhooks for fulfillment using Postman
  • Prerequisites
  • Register the Webhook URL for the order.accepted event
  • Register the webhook URL for the order.complete event
  • Set up webhooks for VAT invoicing​
  1. Integrating the Digital River Salesforce B2B Commerce App

Step 9: Set up webhooks

Learn how to set up webhooks for fulfillment and for VAT invoicing.

PreviousStep 8: Set up Digital River fulfillmentsNextStep 10: Configure CC Admin settings

Last updated 4 years ago

Set up webhooks for fulfillment using Postman

Digital River uses webhooks to notify the app when events occur. As part of the fulfillment process, the app looks for two events: order.accepted and order.complete.

The order.accepted event occurs whenever a Digital River order is submitted, and the payment is Authorized (funds are not captured yet).

The order.complete event occurs whenever an order is both fulfilled and captured (funds are captured).

Follow the steps below to register webhook URLs for your Digital River site so that Digital River can notify the app when the order.accepted and order.complete events occur.

Prerequisites

You will need the following information before you set up the webhook URLs.

  • Username of Fulfillment Integration User.

  • Password of Fulfillment Integration User.

  • Client Id of Connected App DigitalRiver B2B Fulfillment created in .

  • Client Secret of Connected App DigitalRiver B2B Fulfillment created in .

  • Security Token of Fulfillment Integration User.

Register the Webhook URL for the order.accepted event

  1. Open a REST client such as Postman.

  2. Set the HTTP method to POST.

  3. Set the URL as https://api.digitalriver.com/webhooks.

  4. Set the HTTP body as shown in the following example:

{
    "types": [
        "order.accepted"
    ],
    "address": "<<SF_My_Domain_Name>>/services/apexrest/digitalriverv2/DROFIOrderMgmNotification/",
    "apiVersion": "default",
    "enabled": true,
    "transportType": "OAUTH",
    "oauth": {
        "tokenEndPoint": "<<SF_OAuth_Access_Token_Endpoint>",
        "userName": "<<Fulfillment_User_SF_Username>>",
        "password": "<<Fulfillment_User_SF_Password+SecurityToken>>",
        "clientID": "<<Fulfillment_ConnectedApp_Client_Id>>",
        "clientSecret": "<<Fulfillment_ConnectedApp_Client_Secret>>",
        "grantType": "password"
    }
}  

Note: The URL for the tokenEndpointis “https://test.salesforce.com/services/oauth2/token” for the sandbox and “https://login.salesforce.com/services/oauth2/token” for production.

Register the webhook URL for the order.complete event

  1. Open Postman.

  2. Set the HTTP method to POST.

  3. Set the URL as https://api.digitalriver.com/webhooks.

  4. Set the HTTP body as shown in the following example:


    "types": [
        "order.complete"
    ],
    "address": "<<SF_My_Domain_Name>>/services/apexrest/digitalriverv2/DROrderCompleteNotification/",
    "apiVersion": "default",
    "enabled": true,
    "transportType": "OAUTH",
    "oauth": {
        "tokenEndPoint": "<<SF_OAuth_Access_Token_Endpoint>",
        "userName": "<<Fulfillment_User_SF_Username>>",
        "password": "<<Fulfillment_User_SF_Password+SecurityToken>>",
        "clientID": "<<Fulfillment_ConnectedApp_Client_Id>>",
        "clientSecret": "<<Fulfillment_ConnectedApp_Client_Secret>>",
        "grantType": "password"
    }
} 

Set up webhooks for VAT invoicing​

Support for retrieving VAT Invoices is now available within this app.

Sample Webhook registration for the event order.invoice.created.

{  
  "types": [  
    "order.invoice.created"  
  ],  
  "address": "<<SF_My_Domain_Name>>/services/apexrest/digitalriverv2/webhooks/",  
  "apiVersion": "default",  
  "enabled": true,  
  "transportType": "OAUTH",  
  "oauth": {  
    "tokenEndPoint": "<<SF_OAuth_Access_Token_Endpoint>",  
    "userName": "<<Fulfillment_User_SF_Username>>",  
    "password": "<<Fulfillment_User_SF_Password+SecurityToken>>",  
    "clientID": "<<Fulfillment_ConnectedApp_Client_Id>>",  
    "clientSecret": "<<Fulfillment_ConnectedApp_Client_Secret>>",  
    "grantType": "password"  
  }  
}  

Note: The URL for the tokenEndpointis https://test.salesforce.com/services/oauth2/token for the sandbox and https://login.salesforce.com/services/oauth2/token for production.

For the address, the MyDomain URL should be (https://example-domain.my.salesforce.com), not the Lightning Force URL (https://example-domain.lightning.force.com).

A successful request returns a 200 OK response. Once configured, you can see these in the .

webhooks
Digital River Dashboard
step 8a
step 8a