> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/commerce-ai/17.latest/using-umbraco-commerce-ai/permissions-and-customer-data.md). Agents can also search and read this documentation through its [MCP server](https://docs.umbraco.com/~gitbook/mcp).

# Permissions and Customer Data

How Umbraco Commerce AI checks permissions, and what happens to customer data in tool results.

Umbraco Commerce AI reads your store data on behalf of the signed-in backoffice user. This article explains which permission checks apply, and what happens to customer data the tools return.

## Read-only by design

Every Umbraco Commerce AI tool is in the **Commerce (Read)** tool scope. No tool creates, changes, or deletes anything in Umbraco Commerce.

Other packages add tool scopes that can change data, such as **Content (Write)** or **Publish Entity**. To keep an agent read-only, enable only read scopes on its **Governance** tab. See [Tool scopes](https://docs.umbraco.com/commerce-ai/17.latest/using-umbraco-commerce-ai/example-commerce-assistant-agent.md#tool-scopes) for a recommended set.

## Permission checks

Each tool call runs as the signed-in backoffice user and checks two permissions:

1. **Section access.** The user's group must have access to the **Commerce** section.
2. **Store access.** The user must have access to the store being asked about. You give access on the store's **Permissions** tab in the **Settings** section. See [Step 3: Give the user group access to your stores](https://docs.umbraco.com/commerce-ai/17.latest/getting-started/installation.md#step-3-give-the-user-group-access-to-your-stores).

`commerce_get_stores` lists only the stores the user has access to. When a check fails, the tool returns the same message whether the store doesn't exist or the user isn't allowed to see it. The answer never reveals which stores exist.

Different users asking the same question can get different answers, depending on the stores each of them can access.

## Customer data in tool results

Some tools return personal data, such as customer names and order details. A tool result is part of the conversation, so it's:

* Sent to the AI provider configured on the agent's profile.
* Stored in the Umbraco AI audit log, as long as prompts are persisted.

Review your AI provider's data processing terms before you use the Copilot with real customer data.

### What the tools leave out

The customer and order tools never return email addresses, phone numbers, customer references, notes, or other contact details. An email address typed into a customer's name, a tag, or other customer text is replaced with `[email removed]`. If a name contains only an email address, no name is returned.

### The audit log

Umbraco AI keeps an audit log of AI operations, including prompts that contain tool results. By default, entries are kept for 14 days. See [Audit Logs](https://docs.umbraco.com/ai-in-umbraco/backoffice/audit-logs) for the retention, size limit, and persistence settings.

The `Umbraco:AI:AuditLog:RedactionPatterns` setting takes regular expressions. Matching text is redacted in what the audit log stores. Redaction doesn't change what is sent to the AI provider.

The following pattern redacts plain ASCII email addresses in the stored log, including `Name <address>` and an address at the start of a line:

{% code title="appsettings.json" overflow="wrap" %}

```json
{
  "Umbraco": {
    "AI": {
      "AuditLog": {
        "RedactionPatterns": [
          "(?:(?<![A-Za-z0-9._%+\\x5C-])|(?<=\\x5Cu003[Cc])|(?<=\\x5C[nrt]))[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(?![A-Za-z0-9])"
        ]
      }
    }
  }
}
```

{% endcode %}

The pattern is conservative on purpose. The audit log stores JSON text, in which characters such as `+`, `'`, `<`, and `é` are escaped as `\uXXXX`. A broader pattern can cut into neighboring text or break the stored JSON. As a result, an address containing `+`, `'`, or a non-ASCII letter is **not** redacted.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.umbraco.com/commerce-ai/17.latest/using-umbraco-commerce-ai/permissions-and-customer-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
