Create order

Action ID
actions.intent.CREATE_ORDER
Description

Re-order a product that has previously been purchased. Determine the previous order to use by its description using the order.orderedItem.description parameter, if available.

Your app must confirm with the user before placing the order.

Locale support

Functionality Locales
Preview creation using App Actions test tool en-US, pt-BR
User invocation from Google Assistant en-US, pt-BR

Example queries

The following fields represent essential information that users often provide in queries that trigger this built-in intent:

order.orderedItem.description

Other supported fields

The following fields represent information that users often provide to disambiguate their needs or otherwise improve their results:

order.@type
order.orderedItem.@type

Supported text values by field



Sample XML files

For information about the actions.xml schema, see Create actions.xml. For information about the shortcuts.xml schema, see Create shorcuts.xml.

Handle BII parameters

shortcuts.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample shortcuts.xml -->
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
  <capability android:name="actions.intent.CREATE_ORDER">
    <intent
      android:action="android.intent.action.VIEW"
      android:targetPackage="YOUR_UNIQUE_APPLICATION_ID"
      android:targetClass="YOUR_TARGET_CLASS">
      <!-- Eg. description = "Shoes" -->
      <parameter
        android:name="order.orderedItem.description"
        android:key="description"/>
    </intent>
  </capability>
</shortcuts>
      

actions.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
  <action intentName="actions.intent.CREATE_ORDER">
    <fulfillment urlTemplate="myapp://custom-deeplink{?description}">
      <!-- e.g. description = "Shoes" -->
      <!-- (Optional) Require a field eg.description for fulfillment with required="true" -->
      <parameter-mapping urlParameter="description" intentParameter="order.orderedItem.description" required="true" />
    </fulfillment>

    <!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink -->
    <fulfillment urlTemplate="myapp://deeplink" />
  </action>
</actions>

JSON-LD sample

The following JSON-LD sample provides some example values that you can use in the App Actions test tool:

{
  "@context": "http://schema.org",
  "@type": "Order",
  "orderedItem": {
    "@type": "Product",
    "description": "Shoes"
  }
}