# How it works

Use the Salesforce Lightning app to enable Digital River to be the merchant of record for storefronts hosted on the Salesforce platform.

* Salesforce Lightning B2B Commerce maintains all pricing and product data.
* Digital River maintains minimal product data used to fulfill its requirements as the merchant of record. This data is used for tax calculations, tax collection, tax payments, and payment processing.
* Digital River automatically syncs with the Product (Product2) in Salesforce Lightning with minimal information needed to calculate taxes and enable the merchant of record functions.
* Digital River maintains a copy of the cart (WebCart), the customer, and the order.
* The fulfiller updates the status of the order from `accepted` to `fulfilled` or `canceled` in Salesforce. The Digital River app sends the updated order status to Digital River, who will settle the funds.

## Digital River checkout flow

{% file src="/files/6zJCGFPPs7useI3T18O1" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalriver.com/salesforce-lightning/salesforce-lightning-b2b-commerce-app-1.3/introduction/how-it-works.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
