Create contact point

Action ID
actions.intent.CREATE_CONTACT_POINT
Description

Construct a new contact. Populate the new contact's name and phone number using the contactPoint.contact.name and contactPoint.telephone intent parameters. Additionally populate the type of contact (like friend, family, or work) using the contactPoint.description intent parameter, if available.

Your app must confirm with the user before creating a contact.

Locale support

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

Example queries

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

contactPoint.contact.name
contactPoint.telephone

Other supported fields

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

contactPoint.@type
contactPoint.contact.@type
contactPoint.description

Supported text values by field



Sample XML files

For information about the shortcuts.xml schema, see Create shortcuts.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_CONTACT_POINT">
    <intent
      android:action="android.intent.action.VIEW"
      android:targetPackage="YOUR_UNIQUE_APPLICATION_ID"
      android:targetClass="YOUR_TARGET_CLASS">
      <!-- Eg. telephone = "+1-877-453-1304" -->
      <parameter
        android:name="contactPoint.telephone"
        android:key="telephone"/>
      <!-- Eg. description = "Friend" -->
      <parameter
        android:name="contactPoint.description"
        android:key="description"/>
      <!-- Eg. name = "John Doe" -->
      <parameter
        android:name="contactPoint.contact.name"
        android:key="name"/>
    </intent>
  </capability>
</shortcuts>
      

actions.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
  <action intentName="actions.intent.CREATE_CONTACT_POINT">
    <fulfillment urlTemplate="myapp://custom-deeplink{?telephone,description,name}">
      <!-- e.g. telephone = "+1-877-453-1304" -->
      <!-- (Optional) Require a field eg.telephone for fulfillment with required="true" -->
      <parameter-mapping urlParameter="telephone" intentParameter="contactPoint.telephone" required="true" />
      <!-- e.g. description = "Friend" -->
      <parameter-mapping urlParameter="description" intentParameter="contactPoint.description" />
      <!-- e.g. name = "John Doe" -->
      <parameter-mapping urlParameter="name" intentParameter="contactPoint.contact.name" />
    </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.googleapis.com",
  "@type": "ContactPoint",
  "contact": {
    "@type": "Person",
    "name": "John Doe"
  },
  "description": "Friend",
  "telephone": "+1-877-453-1304"
}