Edit in GitHubLog an issue

Expose Commerce data

This runtime action is responsible for notifying the external backoffice application when an <object> is created, updated, or deleted in Adobe Commerce.

The create, update, and delete runtime actions in the Adobe Commerce integration starter kit perform one of the following functions:

  • Expose Commerce data - Notifies an external back-office application when an <object> is created, updated, or deleted in Adobe Commerce. Actions that react to Adobe Commerce events and notify the external back-office application are located in the actions/<object>/commerce folder.
  • Enrich Shopping experience - Notifies Adobe Commerce when an <object> is created, updated, or deleted in an external back-office application. Actions that react to back-office application events and notify Adobe Commerce are located in the actions/<object>/external folder.

starter kit diagram

  • Preprocessing data - Any preprocessing needed before calling the Adobe Commerce API can be implemented in the preProcess function in the pre.js file.
  • Postprocessing data - Any postprocessing needed after calling the Adobe Commerce API can be implemented in the postProcess function in the post.js file.

Incoming event payload

The incoming event payload specified during event registration determines the incoming information.

publish info from commerce

The order runtime action requires the created_at and updated_at fields.

Copied to your clipboard
{
"id": 1,
"created_at":"2000-12-31 16:52:40",
"updated_at":"2000-12-31 16:48:40"
}

The params also specify the event_code and event_id.

Payload transformation

If necessary, make any transformation changes necessary for the external backoffice application's formatting in the transformData function in the transformer.js file.

Connect to the backoffice application

Define the connection information in the sendData function in the sender.js file. Include all the authentication and connection information in the sender.js file or an extracted file outside index.js.

Parameters from the environment can be accessed from params. Add the necessary parameters in the actions/<object>/commerce/actions.config.yaml under created -> inputs, updated -> inputs, or deleted -> inputs as follows:

Copied to your clipboard
created:
function: commerce/created/index.js
web: 'no'
runtime: nodejs:16
inputs:
LOG_LEVEL: debug
HERE_YOUR_PARAM: $HERE_YOUR_PARAM_ENV
annotations:
require-adobe-auth: true
final: true
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.