Skip to main content
Related API: This extension modifies the Create Returns operation.
This action occurs after a return action is performed. Changes made to the return in this action persist in Kibo.
Action TypeEmbedded
Full Action IDembedded.commerce.return.actions.after
Runs multiple custom functions?Yes

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: Return

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 creates returns.

Get

get.rma

Retrieves the current return.
ParameterTypeDescription
N/AN/AN/A
Example:
Response:

get.returnAction

Retrieves the current return action.
ParameterTypeDescription
N/AN/AN/A
Example:
Response: Returns an available return action.

Exec

exec.addReturnItem

Adds an item to the RMA.
ParameterTypeDescription
returnItemobjectA return item API object.
Example:
Response:

exec.authorizeReturn

Authorizes the return.
ParameterTypeDescription
N/AN/AN/A
Example:
Response:
For information about the properties in the response, refer to the REST API Help.

exec.cancelReturn

Cancels the return.
ParameterTypeDescription
N/AN/AN/A
Example:
Response:
For information about the properties in the response, refer to the REST API Help.

exec.closeReturn

Closes the return.
ParameterTypeDescription
N/AN/AN/A
Example:
Response:
For information about the properties in the response, refer to the REST API Help.

exec.rejectReturn

Rejects the return.
ParameterTypeDescription
N/AN/AN/A
Example:
Response:
For information about the properties in the response, refer to the REST API Help.

exec.setRMADeadline

Sets the deadline for the shopper to ship the items in the RMA to the merchant.
ParameterTypeDescription
rmaDeadlineDateA date in UTC format.
Example:
Response: No response.

Context Objects Available to All Actions

apiContext

Accesses tenant information.
PropertyTypeDescription
baseUrlstringThe base URL for the site.
basePciUrlstringThe base PCI URL for the site.
tenantPodstringThe name of the tenant pod in which the tenant resides.
appClaimsstringThe application claims token.
appKeystringThe application key.
tenantIdintegerUnique identifier for the tenant.
siteIdintegerUnique identifier for the site. This ID is used at all levels of a store, catalog, and tenant to associate objects to a site.
masterCatalogIdintegerUnique identifier for the master catalog.
catalogIdintegerThe unique identifier for the product catalog. Catalogs are part of a master catalog.
currencyCodestringThe default three-letter ISO currency code for monetary amounts.
previewDatedate/timeThe date and time that the content is being viewed. This might be a future date if the content is previewed with an active date range set in the future.
localeCodestringThe locale code per the country code provided. This code determines the localized content to use and display.
correlationIdstringThe unique identifier of the API request associated with the event action, which might contain multiple actions.
isAuthorizedAsAdminBooleanIndicates whether the Dev Account user is authorized as an admin.
userClaimsstringThe user claims token.
Example:

configuration

Receives a JSON response that contains information about the configuration data set in the Action Management JSON editor.
PropertyTypeDescription
VariesobjectCustom fields and values that you can set in the Action Management JSON Editor.
Example: