Comment on page
Learn more about the fulfillment/cancellation flow.
In this model, listen for the
order.acceptedevent before initiating the Fulfillment/cancellation process.
Fulfillments/cancellations are done in two ways:
- Order level fulfillment/cancellation
- Line level fulfillment/cancellation
Partial line level fulfillments/cancellations are not supported at this time.
Fulfillment/cancellation flow diagram
An Order Level fulfillment/cancellation request to Digital River can be initiated by changing/updating the Digital River Order State field on the order in question as follows:
- For Order level fulfillment, change/update the Digital River Order State field on the order to fulfilled.
- For Order level cancellation, change/update the Digital River Order State field on the order to cancelled.
Changing the DR Order State field value to either
cancelledon an order will result in the following:
- Triggers the creation of
DR Fulfillment Request Logrecord(s) corresponding to each order item in the Order that has not been previously fulfilled or cancelled.
- Relevant fields on
Digital River Fulfillmentobject get updated with Digital River and Salesforce order-related information accordingly (for example, Digital River Order State).
- Creation of corresponding
DR Line Item Fulfillmentrecords for each order line item that has not previously been fulfilled or cancelled.
- The Fulfillment/Cancellation batch job on its next scheduled run, transmits relevant line item fulfillment/cancellation requests pertaining to a given order to Digital River.
- Once Digital River processes the relevant line-item fulfillment/cancellation requests successfully for a given order, the Digital River Fulfillment Status field is set to complete on both (a)
Digital River Fulfillmentobject for the order in question and on (b)
DR Line Item Fulfillmentobjects for the order.
A Line Item level fulfillment/cancellation request to Digital River can be initiated by creating the relevant
DR Fulfillment Request Logrecord for the line-item level record in question. Refer to the DR Fulfillment Request Log object section for details on this record.
- When fulfillment/cancellation request records are created in
DR Fulfillment Request Log, corresponding line item level requests are also created in
Digital River Line Item Fulfillmentsfor each of the order line-item records being fulfilled/cancelled.
- The Fulfillment/Cancellation batch job on its next scheduled run, transmits relevant line-item fulfillment/cancellation requests about a given order to Digital River.
- Once Digital River processes the relevant line-item fulfillment/cancellation requests successfully for a given order, the Digital River Fulfillment Status field is set to
DR Line Item Fulfillmentobjects for the order.
- The Digital River Fulfillment Status field will not be updated to
Digital River Fulfillmentuntil all the line items are fulfilled/cancelled. Until then, the status will remain
When the scheduled
digitalriverv3.DRB2B_OrderFulfillmentBatchJobruns, it transmits relevant line-item level fulfillment/cancellation requests (pertaining to both Order level and Line-item level fulfillment/cancellation requests) to Digital River.
The following custom objects are part of the fulfillment/cancellation process:
- DR Fulfillment Request Log
- Digital River Fulfillment
- DR Line Item Fulfillment
DR Fulfillment Request Logobject is used to store Fulfillment/Cancellation requests related transaction logs information from the client application for Order level or Line-item level fulfillment/cancellation requests.
DR Fulfillment Request Logrecord should be created (either manually or through automation) whenever an order or order line item is fulfilled/cancelled on the client side.
DR Fulfillment Request Logcustom object has the following custom fields in it:
The DR Fulfillment Request Log record (fulfillment/cancellation request) creation requires the following fields to be populated:
- Order Id
- OrderItem Id
- Fulfill Quantity
- Cancel Quantity
Since Partial Fulfillment/Cancellation is not supported at this time, only one of the two fields (Fulfill Quantity or Cancel Quantity) needs to be populated (with the full line item quantity) and the other should be 0.
- When a DR Fulfillment Request Log record is created for fulfillment/cancellation request, corresponding line-level fulfillment/cancellation requests are automatically created in Digital River Line Item Fulfillments.
- When Salesforce receives an
order.acceptedevent for an order, a corresponding Order level Fulfillment record is created in the
Digital River Fulfillmentobject.
- When a fulfillment occurs at the order level, a corresponding DR Line Item Fulfillment object is automatically created for each line item that has not previously been fulfilled or cancelled.
- When a line item is fulfilled/cancelled, a corresponding DR Line Item Fulfillment object is automatically created.
This object contains the Order Level Fulfillment/Cancellation information.
This object has custom fields to capture Order Item Fulfill and Cancel quantities requested by the client. This information will be posted to DR as part of the fulfillment/cancellation request:
Custom fields have been created on the
Order Itemobject to store the following items for an order line item:
Once the order has been created, the DR Open Quantity field on the
Order Itemobject will be updated and set to the actual purchased quantity.
Once a successful response is received from DR for fulfillment/cancellation requests, the Digital River Order Item State and DR Fulfilled Quantity/DR Canceled Quantity are updated on the
Once a fulfillment/cancellation request for a particular order line item is successfully processed by Digital River, the DR Order Item State field will be set to fulfilled/cancelled and the DR Fulfilled Quantity/DR Canceled Quantity to the quantity in fulfillment/cancellation request respectively.
The DR Open Quantity field will be updated once
DR Fulfillment Request Logrecord is created. This will be changed to zero so that no future requests are made for already fulfilled/cancelled line items.
The following screenshots show an Order Item before it is fulfilled/cancelled:
The following screenshot shows an Order Item after it is fulfilled/cancelled: