You are here:
Use the Order Status via API Event
Trigger automation flows when order statuses change in your external commerce system, such as when orders are placed, processed, or updated.
Required Editions
| Available in: Salesforce Enterprise and Unlimited Editions with Marketing Cloud Next Growth or Advanced Edition |
| User Permissions Needed | |
|---|---|
| To create and manage flows: | Marketing Cloud Admin permission set OR Marketing Cloud Manager permission set |
The Order Status via API event enables you to automate marketing actions based on order status changes. Use this event to send order confirmations when purchases are completed, notify customers of processing updates, or trigger other automated communications when order statuses change in your commerce system.
- In Marketing Cloud Next, go to Flows.
-
Create a flow with the Order Status event.
- Create a new flow and select Automation Event-Triggered Flow.
- In the Event Library, search for and select Order Status via API.
-
Review the example payload to understand the available order status data
fields.
The payload includes required fields from these DMOs:
Data Model Object (DMO) Required Fields Sales Order DMO - Order ID (
ssot__Id__c) - Sold To Customer ID (
ssot__SoldToCustomerId__c)
Individual DMO Individual ID ( ssot__Id__c)Contact Point Email DMO Email ID ( ssot__Id__c)Contact Point Phone DMO Telephone ID ( ssot__Id__c)Sales Order Product DMO Sales Order Product ID ( ssot__Id__c)Product DMO Product ID ( ssot__Id__c)Here's the payload
{ "inputs": [ { "$Event": { "ssot__CreatedDate__c": "DateTime", "ssot__DataSourceId__c": "String", "ssot__DataSourceObjectId__c": "String", "ssot__Id__c": "String", "ssot__InternalOrganizationId__c": "String", "ssot__Name__c": "String", "ssot__OrderNumber__c": "String", "ssot__OrderStartDate__c": "DateTime", "ssot__SalesOrderStatusId__c": "String", "ssot__SoldToCustomerId__c": "String", "ssot__TotalAmount__c": "Number", "KQ_Id__c": "String", "ssot__Individual__dlm": { "ssot__BirthDate__c": "DateTime", "ssot__CreatedDate__c": "DateTime", "ssot__DataSourceId__c": "String", "ssot__DataSourceObjectId__c": "String", "ssot__ExternalRecordId__c": "String", "ssot__ExternalSourceId__c": "String", "ssot__FirstName__c": "String", "ssot__Id__c": "String", "ssot__LastModifiedDate__c": "DateTime", "ssot__LastName__c": "String", "ssot__PersonName__c": "String", "ssot__Salutation__c": "String", "ssot__TitleName__c": "String", "KQ_Id__c": "String", "ssot__ContactPointEmail__dlm": [ { "ssot__DataSourceId__c": "String", "ssot__DataSourceObjectId__c": "String", "ssot__EmailAddress__c": "String", "ssot__Id__c": "String", "ssot__PartyId__c": "String", "KQ_Id__c": "String", "KQ_PartyId__c": "String" } ], "ssot__ContactPointPhone__dlm": [ { "ssot__DataSourceId__c": "String", "ssot__DataSourceObjectId__c": "String", "ssot__FormattedE164PhoneNumber__c": "String", "ssot__Id__c": "String", "ssot__PartyId__c": "String", "ssot__TelephoneNumber__c": "String", "KQ_Id__c": "String", "KQ_PartyId__c": "String" } ] }, "ssot__SalesOrderProduct__dlm": [ { "ssot__CreatedDate__c": "DateTime", "ssot__DataSourceId__c": "String", "ssot__DataSourceObjectId__c": "String", "ssot__Id__c": "String", "ssot__OrderedQuantity__c": "Number", "ssot__ProductId__c": "String", "ssot__SalesOrderId__c": "String", "ssot__TotalPriceAmount__c": "Number", "ssot__UnitPriceAmount__c": "Number", "KQ_Id__c": "String", "KQ_SalesOrderId__c": "String", "KQ_ProductId__c": "String", "ssot__Product__dlm": { "ssot__CreatedDate__c": "DateTime", "ssot__DataSourceId__c": "String", "ssot__DataSourceObjectId__c": "String", "ssot__Description__c": "String", "ssot__Id__c": "String", "ssot__Name__c": "String", "ssot__PrimaryProductCategory__c": "String", "ssot__PrimaryProductImageURL__c": "String", "ssot__PrimaryProductSubCategoryName__c": "String", "ssot__ProductCode__c": "String", "ssot__ProductFamily__c": "String", "ssot__ProductSKU__c": "String", "ssot__ProductType__c": "String", "KQ_Id__c": "String" } } ] } } ] } - Order ID (
-
Add flow elements to define the actions that should occur when order status
changes.
For example, add a Send Email Message element to send status-specific notifications to customers.You can map event payload fields to email merge fields or set recipient addresses using customer email data from the payload.
-
If required, add decision elements to create different actions based on specific
order statuses.
For example, send different email templates for Purchased and Canceled statuses.
- Save the flow with a descriptive name and note the API name for your integration.
- Activate the flow to make it ready to receive API triggers.
Configure your external commerce system to trigger the flow when order status changes occur with a POST request:
POST /services/data/<api_version>/actions/custom/flow/flowApiNameDid this article solve your issue?
Let us know so we can improve!
