---
schema_version: "1"
id: e3f53e32ec7d7c3065c4fc42e2ed5d692cfbb701bb2a3b374619f14f3b31b79c
title: Use the Order Status via API Event
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mktg_admin_api_event_order_status.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mktg_admin_api_event_order_status.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 7564c17043ef0be3cdc0af24f89f9a4515523f042654e1174af6cacfa1a324c3
description: Trigger automation flows when order statuses change in your external commerce system, such as when orders are placed, processed, or updated.
products:
  - Marketing
release: "264"
---
# 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

[View supported editions](https://help.salesforce.com/s/articleView?id=mktg.mktg_editions.htm&release=264.0.0&type=5 "Marketing Cloud Next is available in Growth and Advanced editions, and requires Salesforce Enterprise or Unlimited editions. Some features are limited by edition or purchased add-on. All functionality is available in Lightning Experience only.").

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d53298e47">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d53298e47 ">To create and manage flows:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d53298e47 ">
              <p>Marketing Cloud Admin permission set</p>
              <p>OR</p>
              <p style="margin-bottom:0;">Marketing Cloud Manager
                permission set</p>
            </td>

          </tr>
        </tbody>
      </table>

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.

1. In Marketing Cloud Next, go to **Flows**.
2. Create a flow with the Order Status event.
    1. Create a new flow and select **Automation Event-Triggered Flow**.
    2. In the Event Library, search for and select **Order Status via API**.
    3. Review the example payload to understand the available order status data fields.
        
        The payload includes required fields from these DMOs: <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
                <colgroup>
                  <col style="width:37.5%">
                  <col style="width:62.5%">
                </colgroup>
                <thead class="slds-text-title_caps ">
                  <tr class="">
                    <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d53298e135">Data Model Object (DMO)</th>
                    <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d53298e138">Required Fields</th>
                  </tr>
                </thead>
                <tbody>
                  <tr class="">
                    <td data-label="Data Model Object (DMO)" class="slds-cell-wrap" style="vertical-align:top;" headers="d53298e135 "><a href="https://developer.salesforce.com/docs/data/data-cloud-dmo-mapping/guide/c360dm-sales-order-dmo.html" target="_blank">Sales Order DMO</a></td>

                    <td data-label="Required Fields" class="slds-cell-wrap" style="vertical-align:top;" headers="d53298e138 ">
                      <ul>
                        <li>Order ID (<code>ssot__Id__c</code>)</li>

                        <li>Sold To Customer ID (<code>ssot__SoldToCustomerId__c</code>)</li>

                      </ul>
                    </td>

                  </tr>
                  <tr class="">
                    <td data-label="Data Model Object (DMO)" class="slds-cell-wrap" style="vertical-align:top;" headers="d53298e135 "><a href="https://developer.salesforce.com/docs/data/data-cloud-dmo-mapping/guide/c360dm-individual-dmo.html" target="_blank">Individual DMO</a></td>

                    <td data-label="Required Fields" class="slds-cell-wrap" style="vertical-align:top;" headers="d53298e138 ">Individual ID (<code>ssot__Id__c</code>)</td>

                  </tr>
                  <tr class="">
                    <td data-label="Data Model Object (DMO)" class="slds-cell-wrap" style="vertical-align:top;" headers="d53298e135 "><a href="https://developer.salesforce.com/docs/data/data-cloud-dmo-mapping/guide/c360dm-contact-point-email-dmo.html" target="_blank">Contact Point Email DMO</a></td>

                    <td data-label="Required Fields" class="slds-cell-wrap" style="vertical-align:top;" headers="d53298e138 ">Email ID (<code>ssot__Id__c</code>)</td>

                  </tr>
                  <tr class="">
                    <td data-label="Data Model Object (DMO)" class="slds-cell-wrap" style="vertical-align:top;" headers="d53298e135 "><a href="https://developer.salesforce.com/docs/data/data-cloud-dmo-mapping/guide/c360dm-contact-point-phone-dmo.html" target="_blank">Contact Point Phone DMO</a></td>

                    <td data-label="Required Fields" class="slds-cell-wrap" style="vertical-align:top;" headers="d53298e138 ">Telephone ID (<code>ssot__Id__c</code>)</td>

                  </tr>
                  <tr class="">
                    <td data-label="Data Model Object (DMO)" class="slds-cell-wrap" style="vertical-align:top;" headers="d53298e135 "><a href="https://developer.salesforce.com/docs/data/data-cloud-dmo-mapping/guide/c360dm-sales-order-product-dmo.html" target="_blank">Sales Order Product DMO</a></td>

                    <td data-label="Required Fields" class="slds-cell-wrap" style="vertical-align:top;" headers="d53298e138 ">Sales Order Product ID (<code>ssot__Id__c</code>)</td>

                  </tr>
                  <tr class="">
                    <td data-label="Data Model Object (DMO)" class="slds-cell-wrap" style="vertical-align:top;" headers="d53298e135 "><a href="https://developer.salesforce.com/docs/data/data-cloud-dmo-mapping/guide/c360dm-si-productdmo-dmo.html" target="_blank">Product DMO</a></td>

                    <td data-label="Required Fields" class="slds-cell-wrap" style="vertical-align:top;" headers="d53298e138 ">Product ID (<code>ssot__Id__c</code>)</td>

                  </tr>
                </tbody>
              </table>
        
        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"
                    }
                  }
                ]
              }
            }
          ]
        }
        ```
    4. 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.
    5. 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.
    6. Save the flow with a descriptive name and note the API name for your integration.
    7. 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/flowApiName
```