> ## Documentation Index
> Fetch the complete documentation index at: https://www.voiceflow.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Check an order

> Read an existing order for an authenticated customer. The Shopify worked example checks order NS-1042; it does not claim that the order has shipped or been delivered.

Read an existing order for an authenticated customer. The Shopify worked example checks order NS-1042; it does not claim that the order has shipped or been delivered.

For other stores, follow [WooCommerce order reads](/docs/guides/integrations/woocommerce/overview#looking-up-orders), [Wix orders and fulfillments](/docs/guides/integrations/wix-stores/overview#looking-up-orders) or [Squarespace order reads](/docs/guides/integrations/squarespace-commerce/overview#looking-up-orders). Each needs the application-authorized API ID; display numbers and delivery evidence differ.

## Before you begin

- A dedicated test project and a [verified Shopify connection](/docs/documentation/build/tools/shopify#connecting-shopify) for connector examples. Use your actual store values instead of the fictional Northstar examples.
- An application-owned customer/order access check for personal data or changes. Search values and tool Triggers are not authorization.
- A permitted test order that you can inspect in Shopify, with its email, exact order number and authoritative order ID saved by your application.

#### Studio

Open the test project in [Agent studio](https://creator.voiceflow.com).

#### Developer

Use a [Voiceflow bearer credential](/docs/api-reference/authentication) with access to your test project and Environment. Keep it on your backend or development machine. Set:

```sh
export VF_TOKEN='YOUR_VOICEFLOW_BEARER_TOKEN'
export PROJECT_ID='YOUR_TEST_PROJECT_ID'
export ENVIRONMENT='main'
```

Use a current [Voiceflow CLI](/docs/cli/install) if you choose CLI. API and CLI examples use the Environment's saved Draft. Standalone execution does not attach a tool, compile an agent or publish a release.

## Read the permitted order

### 1. Establish the customer's access

Have your application authenticate the customer and resolve the permitted order from its customer-to-order mapping. Supply the verified lookup values to the conversation or backend.

A customer-supplied email, order number or postal code is not an access check. Use one dedicated test order for the builder test.

### 2. Retrieve the order

#### Studio

Add **Shopify → Get order** to the intended path. Configure the verified email and exact order number. Test the question, then inspect the actual tool result before using it in an answer.

Read one permitted order using its verified lookup values. — Read one permitted order using its verified lookup values.

#### Developer

#### API

```sh
curl --fail-with-body --silent --show-error \
  --request POST "https://realtime-api.voiceflow.com/v1/stable/integration/shopify/execute?projectID=$PROJECT_ID&environmentAlias=$ENVIRONMENT" \
  --header "Authorization: Bearer $VF_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "toolName": "shopify_get_order",
  "inputs": {
    "email": "maya@northstar.example",
    "orderNumber": "NS-1042"
  }
}'
```

#### CLI

```sh
vf integration execute --output-format json --integration shopify \
  --project-id "$PROJECT_ID" --environment-alias "$ENVIRONMENT" \
  --tool-name shopify_get_order \
  --inputs '{
  "email": "maya@northstar.example",
  "orderNumber": "NS-1042"
}'
```

Require `success: true`, `error: null` and `truncated: false` before using `output.data`. An HTTP 200 alone does not establish a successful action. Confirm `output.data.id` equals the application-authorized order ID. The handler returns the first match, so the existence of a record is insufficient.

### 3. Return the supported information

Compare the returned ID with the application-authorized order ID before sharing details.

| Information | How to use it |
| --- | --- |
| Order name and line items | Summarize the matched order. |
| Cancellation fields | Explain cancellation only when the actual fields establish it. |
| `statusPageUrl` | Offer the store’s status page within the authorized customer session. |

Carrier tracking events, payment status and verified delivery time need another source; this action does not return them.

## Verify the customer result

- **Permitted order:** compare the answer with the same test order in Shopify.
- **Missing order:** do not claim a delivery or cancellation state; offer your support fallback.
- **Failed customer association or wrong returned ID:** stop disclosure and use the configured support path.

The lookup checks at most ten results and returns the first match. Email plus postal code does not uniquely identify an order.

For a confirmed change, continue with [Change or cancel an order](/docs/guides/integrations/commerce/change-or-cancel-an-order). For an unresolved delivery question, [route the request to support](/docs/guides/integrations/help-desks/create-and-route-support-requests) with permitted order context.
