Create Order From Cart Action
Create single order creation for all items present in the cart. An order is generated for the entire cart as a whole, rather than for individual cart items.
When the custom product name for an order line item has a value, the asset name is set to custom product name.
This action is available in API version 66.0 and later.
This is applicable for Consumer Sales for business-to-consumer (B2C).
You need the CME B2C permission set to use this invocable action.
URI: /services/data/v66.0/actions/standard/createOrderFromCart
Formats: JSON, XML
HTTP Methods: POST
Authentication: Authorization: Bearer TOKEN
Where, TOKEN is a variable.
| Input | Type | Description |
|---|---|---|
cartId | string | Required. Id of the cart. |
contextId | string | Id of the context. |
: Both cartId and contextId are supported. At least one of these inputs must be provided. If both are supplied, cartId will take precedence.
| Output | Details |
|---|---|
orderId | Description: Id of the order created. |
- POST
This sample request is for the Create or Update Asset From Order action.
This sample response is for the Create Order From Cart action.
Without error sample response:
With error sample response: