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.

global interface checkout_AsyncCartProcessor {
 
   //Integration for async processing
   IntegrationStatus startCartProcessAsync(
      IntegrationInfo integrationInfo,
      Id cartId);
}

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.