# Start a custom action from a template

> Fill in a custom action for Shopify, WooCommerce, Stripe or your own order API, then connect it with your own key.

Source: https://help.askmavis.co/help/action-templates  
Collection: Actions and procedures  
Last updated: 2026-12-05

Templates fill in a [custom action](https://help.askmavis.co/help/custom-actions) for a well-known API, so you don't have to work out the URL, inputs and fields yourself. A template is a starting point, not a built-in connection: you connect it with your own store address and key, and you check it with **Send test request** before you save. Templates are on paid plans, like custom actions.

Each template follows the vendor's published API documentation. Always run **Send test request** against your own store before you rely on it.

## The templates

| Template | What the visitor gives | What the AI agent can tell them | What you need |
| --- | --- | --- | --- |
| **Shopify order status** | Order number and checkout email | Fulfillment status, courier, tracking number and tracking link | Your store address and an Admin API access token from a custom app with the `read_orders` scope |
| **WooCommerce order status** | Order number and checkout email | Status, date, total and shipping method | Your store address (https) and a REST API key with Read access |
| **Stripe find payment** | Nothing: they must be signed in | Their recent payments and refunds | A restricted key with Read access to Charges, and their Stripe customer ID in your identity token |
| **Generic order lookup** | Order number and email | Status, tracking link and expected delivery | An orders URL that answers JSON, and an API key |

## How each one asks for the data

- **Shopify** uses the GraphQL Admin API, because Shopify's REST Admin API is now legacy. It searches your orders for the order number and the checkout email together, so a visitor only ever sees orders placed with the email they gave. With the `read_orders` scope, Shopify only returns orders from the last 60 days.
- **WooCommerce** uses the REST API (`/wp-json/wc/v3/orders/<id>`). It reads the order, then checks that the order's billing email matches the email the visitor gave. If it doesn't, the AI agent answers as if there were no such order. If your store uses a plugin that changes order numbers, the number a shopper sees may not be the order ID, so test with a real order first.
- **Stripe** searches charges for the visitor's Stripe customer. Stripe can't search payments by email, so your website has to include the visitor's Stripe customer ID (it starts with `cus_`) in the identity token, as `stripe_customer_id` inside `custom_attributes`. Anonymous visitors are offered a handoff to your team instead. See [Sign in your visitors](https://help.askmavis.co/help/identity-verification). New payments can take up to a minute to show up in Stripe search, and Stripe search isn't available to businesses in India.
- **Generic** sends the order number and email to your own API. Your API should only answer when both match.

## Add one

1. Open your agent, go to **Actions** and click **Add action**.
2. Under **Or start from a template**, pick one.
3. Enter your store address and key. Keys are stored encrypted and are never shown again.
4. Click **Continue**. The custom action editor opens with everything filled in.
5. Type a real order number and its email under the URL and click **Send test request**. It works before you save, so you can check the key straight away.
6. Check **Fields the AI can see**. The template picks only status and tracking fields, never addresses or payment details. Change them if you need to.
7. Save, then publish your agent.

## Keep orders private

Order numbers are easy to guess, so every order template also asks for the checkout email. The WooCommerce template uses **Check a detail** for this: the AI agent only sees the order when its billing email matches what the visitor gave. You can use **Check a detail** on your own custom actions too. See [Custom actions](https://help.askmavis.co/help/custom-actions).

## If the test fails

- **The API answered 401**: the key is wrong or missing a permission.
- **Nothing matches**: the order number or email is wrong, the order is older than 60 days (Shopify), or the order belongs to a different email.
- **The response is larger than 20 KB**: pick fewer fields, or use your own API.

When a call fails in a chat, the AI agent tells the visitor it can't check right now and offers your team. It never shows the error.

## Related

- [Custom actions](https://help.askmavis.co/help/custom-actions)
- [Lookup table](https://help.askmavis.co/help/lookup-table)
