Adobe Commerce Starter Kit is for Beta users only and is not yet accessible to all customers.
Ingestion webhook
The Adobe Commerce Extensibility Starter Kit supports ingestion webhooks. They provide an alternative method to deliver events for scenarios where the calling system cannot produce a request to interact directly with the event provider. For example, if the client cannot add custom headers to the request.
Enabling ingest webhooks
To enable webhooks in the Starter Kit, uncomment the ingestion
section in your app.config.yaml
file:
Copied to your clipboardingestion:license: Apache-2.0actions:$include: ./actions/ingestion/actions.config.yaml
Customizing ingest webhooks
Data parameters contain the information of the event to publish. Each event must include an entity, event
, and value
. The value parameter contains the data to send through the event.
The following entities and their corresponding events are currently available:
product
be-observer.catalog_product_create
be-observer.catalog_product_update
be-observer.catalog_product_delete
customer
be-observer.customer_create
be-observer.customer_update
be-observer.customer_delete
customer-group
be-observer.customer_group_create
be-observer.customer_group_update
be-observer.customer_group_delete
order
be-observer.sales_order_status_update
be-observer.sales_order_shipment_create
be-observer.sales_order_shipment_update
stock
be-observer.catalog_stock_update
The list of entities and their corresponding backoffice
events is available in the Starter Kit's onboarding/config/events.json
file.
The following JSON payload demonstrates a product
entity with a create
event:
Copied to your clipboard{"data": {"uid": "event_uid_1","event": "be-observer.catalog_product_create","value": {"sku": "PRODUCT_SKU","name": "Product SKU","price": 1,"description": "Product SKU description"}}}
Authentication and parameters
Ingest webhooks are not authenticated by default. To add authentication and enable an authentication check, modify the actions/ingestion/webhook/auth.js
file's checkAuthentication
function.
You can access any needed environment parameter from params
. Use the following parameters to inform your .env
authentication settings.
You can provide additional .env
parameters by adding them to the inputs
section of the actions/ingestion/webhook/actions.config.yaml
file:
Copied to your clipboardwebhook:function: ./consumer/index.jsweb: 'no'runtime: nodejs:16inputs:LOG_LEVEL: debugOAUTH_ORG_ID: $OAUTH_ORG_IDOAUTH_CLIENT_ID: $OAUTH_CLIENT_IDOAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRETOAUTH_TECHNICAL_ACCOUNT_ID: $OAUTH_TECHNICAL_ACCOUNT_IDOAUTH_TECHNICAL_ACCOUNT_EMAIL: $OAUTH_TECHNICAL_ACCOUNT_EMAILIO_MANAGEMENT_BASE_URL: $IO_MANAGEMENT_BASE_URLIO_CONSUMER_ID: $IO_CONSUMER_IDIO_PROJECT_ID: $IO_PROJECT_IDIO_WORKSPACE_ID: $IO_WORKSPACE_IDAIO_runtime_namespace: $AIO_runtime_namespaceYOUR_PARAM: $YOUR_PARAM_ENVannotations:require-adobe-auth: falsefinal: true