# AI customer and order search

Find store customers and order summaries through an authorised AI assistant in private operator Team Chat.

*Release 3.3 · admin, operator*

**Team Chat** · **Settings › AI › Functions** · **Settings › AI › Features** · **Settings › Commerce › Commerce Providers**

## What it is

**Customer search** and **Order search** let an authorised AI assistant find store records in private operator **Team Chat**. Search returns candidates or order summaries. You can then request an exact customer, order detail or customer order history using the returned record.

## Who uses it and why

Operators find records when they have a name or order enquiry to investigate without an attached visitor. Administrators connect the assistant to a specific store and select the operations it may use.

## Where to find it

Use the configured AI assistant in **Team Chat**. Administrators with **Settings** and relevant **AI** access, or **Developer**, configure its Commerce function in **Settings › AI › Functions**, assign it through **Settings › AI › Features**, and configure store access in **Settings › Commerce › Commerce Providers**.

## How it works

Ask the assistant to search for a customer using supported name terms or filters. Review the candidates, then identify the intended customer. The assistant can use that returned customer identifier for exact lookup or order history without asking for the email again.

Order searches return summaries with supplied identifiers, dates, contact details, status and totals. Ask for the selected order's detail to retrieve fuller information. Search summaries do not include every order line or shipment.

The request must originate from an authenticated operator in private Team Chat, have no visitor attached, and use a fixed Commerce Provider. Passing a visitor conversation through another assistant does not grant private search access.

## Configure it

1. With **Settings** and relevant **AI** access, or **Developer**, enable **Customer search** and/or **Order search** under the provider's **Use for**. Save and test the store connection.
2. Create or edit a **Commerce** function in **Settings › AI › Functions**.
3. Select a specific **Commerce Provider**. Its operations must support all the selected **Enabled capabilities**.
4. Add the search capabilities and any required **Customer lookup**, **Order list** or **Order lookup** capability.
5. Assign the function to the AI feature used in operator **Team Chat** and configure who can use that assistant.

Automatic website/subsite routing cannot supply unrestricted private search. A fixed provider does not fall back to another store.

### Settings

| Setting | Where | Applies to | Default | Who can change it | What it does |
|---|---|---|---|---|---|
| Commerce Provider | Settings › AI › Functions | website | Automatic website/subsite routing | Settings role, Developer role | Selects one fixed store provider for this Commerce function. Private customer and order search requires a fixed provider; automatic routing cannot supply these searches. |
| Enabled capabilities | Settings › AI › Functions | website | Not set | Settings role, Developer role | Selects Customer search, Order search and any supported exact lookup or history operations for the Commerce function. No capabilities are selected initially; select at least one before saving. |

### Permissions

| Permission | Lets you |
|---|---|
| Settings | Configure providers, Commerce functions and AI features, subject to AI access and View Only. |
| AI | Allows AI and commerce configuration for a restricted Settings role. |
| Developer | Configure the provider and AI function or feature. |

## Limits and good to know

| Provider | Search behaviour |
|---|---|
| Shopify | Customer name terms and supported contact/date filters; order terms and supported customer, date, total and status filters. Order history can be restricted to 60 days without permission for all orders. |
| BigCommerce | Customer names use substring matching. Order query accepts an exact numeric order number or complete email. For a name, search customers first, then request that customer's orders. |
| Salesforce B2C Commerce | Customer name search uses complete words; exact customer number or email is also supported. Order query uses an exact order number. Phone, status and date filters are unsupported. |
| Custom Script | Only the search terms and filters declared by the integration are available. |

- Searches default to 10 results, with a permitted page size of 1 to 50.
- Search terms are limited to 500 characters. Individual filter values are limited to 254 characters.
- Unsupported filters, invalid emails, negative totals and reversed date or total ranges are rejected.
- Continuing a search requires the same store, operator, operation, criteria and page size. Changed criteria need a new search.
- Private search results remain operator information. Sending an order to a visitor requires the separate order-sharing process.

## Depends on and works with

### This feature uses

- **Requires** [AI functions and required inputs](AI-016.md): A Commerce function exposes the enabled search and lookup capabilities.
- **Requires** [Ask AI agents in Team Chat](AI-036.md): Search runs through an authorised AI feature in operator Team Chat.
- **Requires** [Team chat](CHAT-027.md): Unrestricted customer and order searches are confined to private operator Team Chat.
- **Requires** [Commerce provider setup and selection](COM-001.md): Private search needs a fixed enabled provider with the requested operations selected.
- **Configured in** [Roles and permissions](ADM-008.md): Roles control administration of the provider and AI configuration.
- **Configured in** [AI feature settings and change history](AI-001.md): AI feature configuration determines the assistant's functions and permitted use.
- **Configured in** [AI commerce functions and access limits](COM-029.md): The Commerce function's enabled capabilities limit private searches and follow-up reads.
- **Works better with** [Shopify commerce connection](COM-002.md): Shopify supplies native customer and order search with supported filters.
- **Works better with** [Salesforce B2C Commerce connection](COM-003.md): Salesforce B2C Commerce supplies a narrower set of private search criteria.
- **Works better with** [BigCommerce store connection](COM-004.md): BigCommerce supplies customer name search and order search by exact order number or email.
- **Works better with** [Custom commerce integrations](COM-006.md): Custom providers can implement private search and declare supported filters.
- **Works better with** [Store order details and history](COM-013.md): Returned customer and order identifiers can be used for exact detail and history lookup.

### Used by

- **Enhances** [Shopify commerce connection](COM-002.md): Supports private customer and order search in Team Chat.
- **Enhances** [Salesforce B2C Commerce connection](COM-003.md): Optional private reads support restricted customer and order search.
- **Enhances** [BigCommerce store connection](COM-004.md): Supports private customer and order searches.
- **Enhances** [Custom commerce integrations](COM-006.md): Implemented private search operations can be exposed to authenticated operator Team Chat.
- **Enhances** [Store order details and history](COM-013.md): Private Team Chat can find customers and orders before reading detail.
- **Enhances** [AI commerce functions and access limits](COM-029.md): Private customer and order discovery is available only in operator Team Chat.

## FAQ and troubleshooting

### Why does the assistant say private search is unavailable?

Use the authorised assistant in private operator **Team Chat**, without a visitor attached. Ask your **Settings** or **Developer** administrator to check the fixed **Commerce Provider**, enabled function capabilities and provider operations.

### Why can product search work while customer search fails?

Product search can use automatic routing and public catalogue access. Private customer search needs a fixed provider, store customer permissions and the correct Team Chat context.

### Why does BigCommerce reject a person's name in an order search?

Its order query accepts an exact numeric order number or complete email. Search for the customer by name first, choose the correct match, then request their orders.

### Why must I restart a paged search?

Its continuation belongs to the original criteria and page size, as well as the same operator and provider. Restart after changing any of those.

### Does selecting a candidate verify that a visitor owns the account?

No. This is private operator research. Visitor verification and deliberate order sharing have their own checks.
