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.
ccrz.ccLogicCartTransfer.transferCart
Compatibility
This reference applies to:
Release | Managed Package Version | API Version |
---|---|---|
B2B Commerce for Visualforce Winter ’21 | 4.13 | 12 |
B2B Commerce for Visualforce Spring ’20 | 4.12 | 11 |
B2B Commerce for Visualforce Summer ’19 | 4.11 | 10 |
B2B Commerce for Visualforce Spring ’19 | 4.10 | 9 |
B2B Commerce for Visualforce Summer ’18 | 4.9 | 8 |
Signature
global virtual Map<String, Object> transferCart(Map<String, Object>)
Inputs (Required)
This method accepts the Map<String, Object> from the ccrz.ccLogicCartTransfer.processInput method.
This method requires the following keys in the working map:
- ccrz.ccApiAccount.ID
- String that specifies the Salesforce ID of the account to transfer the cart to.
- ccrz.ccApiCart.CART_ENCID
- String that specifies the encrypted ID of the cart to transfer.
- ccrz.ccApiCart.WAS_ANONYMOUS
- Boolean
Value Usage true The cart was originally used by a guest user. false (default) The cart was originally used by an authenticated user. - ccrz.ccApiUser.USER_ID
- String that specifies the Salesforce ID of the user to transfer ownership to.
- ccrz.ccApiUser.USER_NAME
- String that specifies the username of the user to transfer ownership to.
Outputs
This method returns the working Map<String, Object>, and sets the following keys:
- ccrz.ccApiCart.CARTCONTADDR_TO_UPSERT
- List<ccrz__E_ContactAddr__c> of billing and shipping addresses to set on the cart.
- ccrz.ccApiCart.CART_OBJLIST
- List<ccrz__E_Cart__c> that includes the cart to transfer. This list can potentially include other open carts that the new user currently owns, but that must change to inactive after the transfer completes.
- ccrz.ccApiCart.CARTITEMS_TO_UPSERT
- List<ccrz__E_CartItem__c> of items to include in the cart.
- ccrz.ccApiCart.CURRCODE
- String that specifies an ISO 4217 currency code, such as USD or JPY, to set on the cart.