Skip to main content
This action occurs after flattening a configurable bundle on a subscription. Changes made to the subscription or subscription items in this action persist in Kibo. Use this flattenBundleOnConvert action for making line item adjustments when a subscription is converted from an order. Use the validateProduct action for performing lien item adjustments when adding an item, updating a quantity, or creating a subscription.
Action TypeEmbedded
Full Action IDembedded.commerce.subscription.flattenBundleOnConvertAfter
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.

Context: Subscription

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 performs actions on a subscription.

Get

get.subscription

Obtains a response that includes information about the current subscription. When the subscription includes a configurable bundle, the subscription context usually contains flattened line items while the subscriptionItem context contains data of the parent item. However, if you update an item’s quantity then both the subscription and subscriptionItem context will contain the data of flattened items. Refer to item.parentItemCode for identifying the parent item as needed. Example:
Response:
For information about the properties in the response, refer to the REST API Help.

get.subscriptionItem

Obtains a response that includes information about the current subscription item. When the subscription includes a configurable bundle, the subscription context usually contains flattened line items while the subscriptionItem context contains data of the parent item. However, if you update an item’s quantity then both the subscription and subscriptionItem context will contain the data of flattened items. Refer to item.parentItemCode for identifying the parent item as needed. Example:
Response:
For information about the properties in the response, refer to the REST API Help.

Exec

exec.setItemOverridePrice

Sets the price on a line item that overrides the catalog or distributed bundle price. Example:
Response:
For information about the properties in the response, refer to the REST API Help.

exec.setLineItemAdjustment

Adjusts a line item that overrides the catalog or distributed bundle amount. Example:
Response:
For information about the properties in the response, refer to the REST API Help.

Context Objects Available to All Actions

apiContext

Accesses tenant information. Example:

configuration

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