orderCreated__e

Prev Next

Use the Order_Created__e platform event when downstream automation or external integrations need to react after checkout creates a web order and the transaction commits successfully. This is the server-side order-created event surface for Flow, Apex, middleware, and other subscribers that must keep working even when the buyer leaves the storefront page.

Overview

Order_Created__e is a high-volume platform event in the order domain. During checkout, OrderCentral registers the event while creating the web order and publishes it only after the transaction succeeds.

This makes the event a better fit than the storefront OrderCreated__c Lightning Message Service channel when your subscriber must run outside the current page context or must wait for committed order data.

When to use this event

Use Order_Created__e when you need to:

  • trigger ERP, fulfillment, or middleware processing after order creation
  • start Flow or Apex automation that should not depend on the buyer page staying open
  • subscribe from an external event-bus client instead of a storefront component
  • separate integration processing from storefront rendering concerns

Do not use this event when you only need to refresh, navigate, or update components already running on the current Experience Cloud page. In that case, use the storefront OrderCreated__c message channel instead.

Event contract

The event payload is intentionally small.

Field Type Description
Web_Order_Id__c Text(18), required Salesforce Id of the created Web_Order__c record.

Subscribers should treat Web_Order_Id__c as the lookup key for follow-up processing. Do not expect denormalized order totals, payment data, or cart details in the platform event itself.

Publish behavior

Checkout registers Order_Created__e during order creation and publishes it with after-commit behavior. In practice, this means:

  • subscribers should only receive the event after the order transaction succeeds
  • the event should not be used as a progress signal for in-page checkout UI
  • subscribers can safely re-query the created web order using Web_Order_Id__c

This publish model is designed for transaction-safe downstream processing, not page-level inter-component communication.

Permission and deployment considerations

Before an integration user or subscriber can consume Order_Created__e, confirm all of the following:

Requirement Why it matters
The Order_Created__e platform event and its Web_Order_Id__c field are deployed in the target org. Subscribers cannot bind to an event contract that is not present in the environment.
The consuming user has read access to Order_Created__e. Event consumers need access to the platform event object.
The integration user has the API and subscriber-level access required by the chosen subscription pattern. External clients, middleware, and some automation entry points require more than object access alone.
The subscriber automation is deployed together with the event contract. Sandboxes and production must stay aligned on both the published contract and the consuming logic.

OrderCentral includes an OrderCentral Integration User permission set that grants read access to Order_Created__e. Use that permission set directly or mirror the same event access in your own integration permission model.

Subscriber design guidance

  • Keep subscribers idempotent so retries or duplicate deliveries do not create duplicate downstream actions.
  • Re-query the target Web_Order__c record by Web_Order_Id__c and load related data explicitly.
  • Keep business logic outside the event payload contract. The event should remain a compact handoff, not a full order snapshot.
  • Do not treat Order_Created__e and OrderCreated__c as interchangeable. They support different extension models.
  • Prefer the platform event whenever follow-up work must continue even if the storefront session ends immediately after checkout.

Troubleshooting

A downstream integration does not receive Order_Created__e

Check these first:

  • The order transaction committed successfully.
  • The Order_Created__e contract is deployed in the environment where you are testing.
  • The integration user has read access to Order_Created__e.
  • The subscriber itself is active and deployed in the same org.

A subscriber receives the event but cannot continue processing

Check these first:

  • The subscriber re-queries the order by Web_Order_Id__c instead of expecting extra fields in the event.
  • The integration user has access to the order data the subscriber needs after receiving the event.
  • The downstream automation handles retry and duplicate-processing scenarios safely.

Summary

Order_Created__e is the supported OrderCentral event surface for server-side and external post-checkout integrations. Use it when follow-up work must start only after the web order transaction commits and when the subscriber should not depend on the current storefront page remaining active.