Skip to main content
Related API: This extension modifies the Get Cart operation.
This action occurs after a GET operation is run against the cart, with the exception of getting cart summaries. Changes made to the cart or cart items in this action persist in Kibo eCommerce.
Action TypeEmbedded
Full Action IDembedded.commerce.carts.get.after
Runs multiple custom functions?No

JavaScript File Structure

Action files share the following basic structure:
When you code the custom function for an action, you have access to two arguments: callback—This argument follows the established JavaScript callback pattern: it takes an error as the first argument (or null if there is no error) and a result as the second argument (if required). context—This argument provides the function access to relevant objects and methods that interface with Kibo eCommerce.

Context: Cart

The methods and objects documented here are available to this action through the use of the context argument. Microservice Operation
This action corresponds to the microservice that gets a cart.

Get

get.cart

Obtains a response that includes information about the current cart. Example:
Response:
For information about the properties in the response, refer to the REST API Help.

Exec

exec.setData

Sets custom key/value data on the current cart. Example:
Response:
For information about the properties in the response, refer to the REST API Help.

exec.removeData

Removes custom key/value data from the specified cart. Example:
Response:
For information about the properties in the response, refer to the REST API Help.

exec.setItemData

Sets custom key/value data on a cart item. Example:
Response:
For information about the properties in the response, refer to the REST API Help.

exec.removeItemData

Removes custom key/value data from a cart item. Example:
Response:
For information about the properties in the response, refer to the REST API Help.

exec.setItemAllocation

Sets soft allocation information on a cart item. Example:
Response:
For information about the properties in the response, refer to the REST API Help.

exec.removeItem

Removes an item from the cart. Example:
Response:
For information about the properties in the response, refer to the REST API Help.

Context Objects Available to All Actions

apiContext

Accesses Kibo eCommerce tenant information. Example:

configuration

Receives a JSON response that contains information about the configuration data set in the Action Management JSON editor. Example: