Salesforce B2C LINK Cartridge

The Digital River LINK cartridge for Salesforce B2C Commerce Cloud provides a global payments and risk mitigation solution. Digital River enables localized payment methods, tax calculation, and secure localized payment processing to minimize declines and foreign transaction fees. Beyond payments, Digital River works behind the scenes to fight fraud, minimize chargebacks, optimize billing to increase authorization rates, and manage global taxes and regulatory compliance. The Digital River LINK cartridge is essential for brands looking to enter new global markets with ease while delivering the right local payment methods, currencies, and tax calculations. This is the only extension brands need for payments, fraud, tax, financial reconciliation, and compliance.

Features:

  • Payment gateway (cards and alternative payment methods)

  • PCI compliance

  • Tokenization

  • Acquirer redundancy

  • Billing optimization

  • Multi-currency support and conversion

  • Tax calculation

  • Tax management (registration, collection, filing, and remittance)

  • Fraud screening

  • Advanced fraud management

  • Fraud liability guarantee

  • Chargeback mitigation and dispute management

  • Global regulatory compliance (for example, GDPR and PSD2)

Component overview

Functional overview

The Digital River package contains three cartridges:

bm_digitalriver

A Business Manager extension cartridge (bm_digitalriver) will communicate with DigitalRiver services and report if they are up or down. These include static requests that use the REST API to send a payload to the Digital River services. The response is then checked to see if the service returns an expected successful response.

int_digitalriver

Integration cartridge containing API integrations that form requests, parse responses, and update objects.

int_digitalriver_sfra

A second integration cartridge (int_digitalriver_sfra) delivers adjustments and extensions to existing storefront functionality. By separating the storefront functionality from the back-end, minimal code changes will be necessary.

Use cases

The Digital River LINK cartridge for Salesforce B2C Commerce Cloud supports the following payment methods:

  • Credit Cards

  • PayPal

  • ApplePay

Limitations, constraints

You can add additional payment methods not included out of the box as needed.

The following Salesforce Commerce Cloud (SFCC) features are not supported:

  • Multiple Shipping Addresses

Compatibility

This package was implemented against SF B2C Version 20.1.

Privacy, payment

This cartridge accesses customer profile data to send the SFCC Customer ID and email to Digital River.

Digital River provides PCI compliance, tokenization, and fraud screening through an API reference. When the shopper enters payment information at checkout, they interact with secure payment fields that are hosted by Digital River within a Salesforce-hosted page. The shopper is never redirected to another page. Those secure fields are served up by DigitalRiver.js, a developer-friendly library that allows brands to securely process transactions without having to take on the responsibilities of PCI compliance. When brands use the DigitalRiver.js API reference on their Salesforce store, Digital River serves up payment methods, validates card data, tokenizes customer information, performs fraud screening, collects sensitive card data, and processes transactions in a manner that is fully compliant with the Payment Card Industry Data Security Standards (PCI DSS). Digital River is a Level 1 PCI compliant service provider. Customer data is stored on Digital River’s secure servers, never on Salesforce servers. The service does not allow PCI data to hit the Salesforce server.

Implementation guide

Step 1: Set up Business Manager

To update your storefront’s cartridge path:

  1. Sign in to your Salesforce B2C Commerce account.

  2. Click Administration, click Sites, and then click Manage Sites. The Storefront Sites page appears.

  3. Click the link for the site you want to update under the Name column. The General tab for your site appears.

  4. Click the Settings tab.

  5. In the Cartridges field, add int_digitalriver:int_digitalriver_sfra to your cartridge path. Add int_digitalriver to the front of the cartridge path, and int_digitalriver_sfra before the main storefront cartridge.

  6. Click Apply.

  7. To update your cartridge path for business manager click Administration, click Sites, and then click Manage Sites.

  8. From the Storefront Site page, click the Business Manager Link under Business Manager Site. The Settings tab appears for Business Manager - Settings.

  9. Add bm_digitalriver to the front of your cartridge path.

  10. Add int_digitalriver:int_digitalriver_sfra to the end of the cartridge path.

  11. Scroll right and click Apply.

Step 2: Import the custom metadata to the instance

To import the custom metadata to the instance:

  1. Click Administration, click Site Development, and then click Site Import & Export. The Site Import and Export page appears.

  2. Under import,

The file contains custom attributes for the system objects:

Basket & Order

  • drOrderID

  • drTotalTax

Product

  • drECCN

  • drCountryOfOrigin

  • drFulfill

  • drPartNumber

Profile

  • globalCommerceCustID

Site Preferences

  • drClientID

  • drAllowedPayments

  • drManufacturerId

  • drAPIKey

Additionally, new Payment Processors are available.

  • DIGITAL_RIVER

  • DIGITAL_RIVER_APPLE_PAY

  • DIGITAL_RIVER_PAYPAL

To get these onto your instance, navigate into the metadata folder. Inside, find the folder “zip_this_up_after_site_change” and enter that folder. In there, there will be a folder called “ChangeThisToSiteID” – Modify this folder name to be the Site ID of your current site. Once that is done, create a ZIP file of the main folder.

Upload the file. Then, select the radio button next to the ZIP in the list of imports.

And lastly, import the file.

To enable the Digital River service checker, the permission needs to be added to the targeted access role. This is optional to enable the Digital River Service Checker module.

In Business Manager, go to Administration, Roles & Permissions. Click on the role to modify (or create a new one) to add the Digital River Service Tester module to that role. Click on Business Manager Modules within the role.

In the next menu, add the Write permission to the DR Service Tester group as indicated below.

Lastly, the order status webhook will need to be able to access the order to update the status of the order properly. To enable this, a setting on the site must be changed.

  • Merchant Tools > Site Preferences > Order

  • Set Limit Storefront Order Access to No

Configuration

CreateSKUs job

The zip will create the initial configuration for the job used to send SKU data to Digital River. After you import the file, go to the jobstep configuration, and change the site scope to your site ID.

Site Preferences

Site > Site Preferences > Custom Preferences > Digital River

These values to be provided by Digital River.

Custom code

Code changes for this cartridge are minimal. Descriptions for each will be broken down by feature.

Create a Customer Profile (during Checkout):

If a customer elects to create a Profile after completing an Order, then some modifications to existing base functionality must be made. You cannot extend this cartridge route because the profile is not passed to the viewData object, which is needed to store the globalCommerceCustID that identifies a customer to Digital River.

  • Order controller (\app_storefront_base\cartridge\controllers\Order.js), CreateAccount route Inside the route:BeforeComplete function

Add the following in the declaration section:

Declaration example

var digitalriver = require('*/cartridge/models/digitalriver');

Add the following code later in the same function, after the customer is created and assigned to the order:

Code example

var drResponse = digitalriver.createCustomer(newCustomerProfile.email, newCustomerProfile.customerNo);if (drResponse.id !== null) { newCustomerProfile.custom.globalCommerceCustID = drResponse.id;}

Payment implementation follows best practices for SFRA. This means the files from the base are extended. You don't need to adjust existing templates or scripts from app_storefront_base.

You only need to make one adjustment to base code, and that is to replace the calculateTax call. To accomplish this, delete the hook associated with the base calculateTax function in cartridges/app_storefront_base/hooks.json.

Note: Investigate your cartridge structure for any other potential reference.

External interfaces

The following services share one profile and one credential:

Create customer service

Sends a JSON object to Digital River consisting of email, SFCC CustomerNumber, and a metadata object.

Create SKU service

Runs in a job context. Iterates over products assigned to the site catalog and sends them to Digital River.

Request service

Service called for all Payments / Orders.

Firewall requirements

No adjustments to the SFCC Firewall settings are needed.

Testing

Create Customer service

Use the Create Customer service to create an account in the storefront. Find the account in Business Manager and then look for the Digital River Attribute Grouping. You should see the returned value from Digital River now assigned to that profile.

Placing an order

Once a customer places an order in the storefront, it will have received an external order ID from Digital River. Digital River identifies the order by this ID.

The following test cases were verified by Digital River in testing:

Test Scenarios

  • Complete Order for Mixed Product with Multiple quantity

  • Complete Order using PayPal Payment Method

  • Complete Order using Credit Card Payment Method

  • Create an Account for Customer

  • Order status update thru webhooks

  • Order Notification

  • Order Search and Verify Order Summary

  • Return using webhook

  • Verify the payment functionality on entering wrong credit card source

  • Verify for Invalid Credit Card

  • Verify the Tax code is mapped to the right tax type or the admin site is up to date with the tax code for the SKU

  • Complete Order creation for Physical Product

  • Complete Physical Order with different Shipping and Billing Address

  • Verify the customer is created on registering new user

  • Submit an Order – Guest Checkout

  • Order Fulfillment – post order action using webhooks

  • Verify the Admin site for DR Order number and Order status.

  • Verify the SKU creation

  • Verify the SKU creation for different prod with diff tax code.

  • Verify the mandatory, optional field and values in the API request from Service Integrator

Example Tests

Account creation test

  1. Navigate to the storefront.

  2. Click Login, then Create account.

  3. Enter account information and click Create account. You will be sent to the account Dashboard.

  4. Return to the Business Manager and navigate to Merchant Tools > Customers > Customers.

  5. Click on your newly created account.

  6. Scroll down and make sure that the Digital River customer ID is present.

SKU creation test

  1. In Business Manager, navigate to Administration > Operations > Jobs.

  2. Click the createSKUs job.

  3. Click Run Now.

  4. After the job concludes, verify with your Digital River representative that the products have been uploaded to Digital River's servers.

Credit card purchase test

  1. Navigate to the storefront and add a product to your cart.

  2. Navigate to the cart page. Verify that the tax value is not present on the cart page, as it has not yet been provided by Digital River.

  3. Proceed to checkout as guest and enter some Shipping information that would generate tax.

  4. Verify that the tax value is not present, then proceed to Payment.

  5. Validate that the tax value is now present on the page.

  6. Make sure that the Digital River credit card and PayPal tabs are present.

  7. Enter card information and proceed with checkout.

  8. Make sure that Digital River terms and conditions are present at the bottom of the page under the Place Order button. Check the links to make sure they are functional.

  9. Click Place Order and proceed to the order success page.

  10. Return to the Business Manager.

  11. Navigate to Merchant Tools > Ordering > Orders. Find and access your order, either by filtering or by searching via your order ID created at checkout.

  12. In the order screen, click on the Attributes tab.

  13. Make sure that a Digital River-provided order ID is present.

Operations and maintenance

Data storage

Outside of Commerce Cloud, Digital River API stores Customer, Order, and SKU data across three areas:

SOC Compliant

PCI Compliant

CPG Payments

Commerce engine for Global Commerce (GC)

Payments Service (PC)

The location is Elastic Search, Oracle, and Cassandra, and the duration is a maximum of 10 years for Customer Data and Order Data except for the EU “Right to be forgotten” GDPR requirements, which we support.

Availability

Services should always be available.

If services are not available, orders and payments cannot be processed.

A provided Business Manager extension cartridge will give real-time status on available services by sending a static request and evaluating the response code sent back to SFCC.

DigitalRiver.js and Digital River API are available globally. Digital River API is available via all three of Digital River’s data centers – Virginia, Oregon, and Ireland. Our load balancers handle fallback.

Digital River’s general availability goal is to respond in 800 ms or less within the Digital River network. The roundtrip response time, which includes external networks, may vary (as expected).

Monitoring with Zabbix is in place, and the Digital River Operations team has logging and notifications in place; Digital River customer-facing teams have access to that data.

Failover/Recovery process

If there is a service disruption, it will impact the ecommerce experience in the following ways:

  1. Payment Methods will not render in the cart during checkout.

  2. Tax calculations will not return to the cart.

  3. Overall customers will be unable to transact on the ecommerce store, which is leveraging Digital River for tax, payments, and risk.

Support

If you encounter any errors, issues, or defects with your implementation of the Digital River LINK Cartridge, contact your System Integrator or Partner.

If you believe there is a defect with the core functionality offered by the Digital River LINK Cartridge, send an email to salesforce@digitalriver.com with your:

  • Salesforce install URL

  • System Integrator/Partner’s information

  • A description of the issue you are experiencing (with a transaction ID if possible), and detailed reproduction steps

For all other questions or inquiries, contact your Salesforce representative.

User guide

Roles, responsibilities

Run the SKU Creation job any time you add new products to the catalog.

Business Manager

Added a new Business Manager menu option under Merchant Tools.

To send calls to the web services listed under Global Commerce - Service Test, click Test Services.

Known issues

As of January 16, 2020, there are no known issues.

Release History

Version

Date

Changes

20.1.0

TBD

Initial release