Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

AsyncCartProcessor Interface

Use this interface to implement asynchronous integrations in B2B Commerce.

Namespace

Sfdc_Checkout

AsyncCartProcessor Methods

The following are methods for AsyncCartProcessor.

startCartProcessAsync(integrationInfo, cartId)

The startCartProcessAsync method is called asynchronously by the integration framework. Calling this method begins cart processing for Commerce checkout.

Signature

public sfdc_checkout.IntegrationStatus startCartProcessAsync(sfdc_checkout.IntegrationInfo integrationInfo, Id cartId)

Parameters

  • integrationInfo:

    Type: IntegrationInfo

    Provides values that B2B Commerce checkout APIs use to map requests to responses, necessary metadata, and context.

  • cartId:

    Type: Id

    ID of the WebCart object.

Return Value

Type: IntegrationStatus

Status of the current integration. Possible values are SUCCESS and FAILED.

AsyncCartProcessor Example Implementation

This is an example implementation of the sfdc_checkout.AsyncCartProcessor interface.

1global interface checkout_AsyncCartProcessor {
2 
3   //Integration for async processing
4   IntegrationStatus startCartProcessAsync(
5      IntegrationInfo integrationInfo,
6      Id cartId);
7}

AsyncCartProcessor is a base interface. There are four interfaces that extend it, including CartInventoryValidation, CartPriceCalculations, CartShippingCharges, and CartTaxCalculations. For more information about these interfaces, including code examples and test classes, see Checkout Integrations.