## What is Amazon Marketing Cloud in DataDoe?

Amazon Marketing Cloud (AMC) lets AI agents and integrations run SQL against a dedicated AMC instance for a Seller or Vendor, through DataDoe MCP or the REST API. You can save workflows with optional schedules, start on-demand queries, poll for results, and download Amazon result files.

AMC is **available by request only**. To request access, use our [contact form](https://forms.clickup.com/9015200219/f/8cnj2ev-38615/AOYF9I35QFOXWJQXIG?type=Form&source=hub-amc-access-request).

Until access is granted, AMC tools and REST routes are not available for the organization.

## How do I enable AMC after access is granted?

1. Connect Amazon Ads for the Seller or Vendor. The Ads identity must have an AMC account that can create new instances for that marketplace (see below).
2. Open the account on the [Accounts page](https://app.datadoe.com/sellers-and-vendors) and enable AMC. Only the organization owner can enable or change AMC.
3. Enable starts setup in the background. We email organization owners when the dedicated instance is ready; you do not need to wait in DataDoe. Queries and workflows then run through MCP or the REST API.

## Which Amazon AMC accounts does DataDoe support?

Amazon has several AMC access paths. See Amazon's [AMC overview](https://advertising.amazon.com/API/docs/en-us/guides/amazon-marketing-cloud/overview):

- **Self-service** for Sponsored Ads advertisers: typically one default instance in the Amazon Ads console. DataDoe does not attach that instance.
- **DSP advertisers**: access is usually requested through an Amazon Ads account executive. That path is not enough on its own.
- **AMC accounts that can create new instances** through the Amazon Ads API: this is the path DataDoe uses.

DataDoe currently supports only the last of these: Ads identities whose AMC accounts Amazon returns as able to create new instances for the same marketplace. DataDoe then creates a **dedicated** instance. It does not import existing instances, and it does not support agency or manager accounts.

If the account is ineligible after Ads is connected, use the [contact form](https://forms.clickup.com/9015200219/f/8cnj2ev-38615/AOYF9I35QFOXWJQXIG?type=Form&source=hub-amc-access-request).

## How much does it cost?

An on-demand AMC query costs **2 AI Tokens** (list price). It is **currently promotional at 0 AI Tokens**, including failed and cancelled executions. Validation is always **0 AI Tokens**. See [Subscription and pricing](/hub/docs/basics/subscription-pricing).

Amazon also limits each dedicated instance to **30 ad-hoc executions per day**. Recurring work should use workflow schedules.

## How to run an AMC query?

Typical runtime is **15 minutes or more**. Poll no faster than **5 seconds**. Download URLs last about **10 minutes** — download immediately when they appear.

Provide **either** `sql` **or** `workflowId`, never both. Raw ad-hoc SQL is never persisted. Reuse `requestId` only with an identical payload.

### Using MCP

1. Connect DataDoe to [Claude](/hub/docs/datadoe-mcp/claude), [ChatGPT](/hub/docs/datadoe-mcp/chatgpt), or [another MCP-capable agent](/hub/docs/datadoe-mcp/overview).
2. Read the live schema with `amc_schema_find`.
3. Dry-run the query with `amc_query_validate` (`sql` or `workflowId`, never both).
4. Start the query with `amc_query_start`.
5. If the response `outcome` is `OPERATION`, poll `amc_operation_get` until the operation is terminal. If `recoveryStatus` is `AWAITING_CLIENT_PAYLOAD`, resubmit the **identical** payload and `requestId` — do not start a second execution.
6. Poll `amc_query_result_get` until `deliveryStatus` is `AVAILABLE`, then download the files immediately.
7. Cancel a pending or running query with `amc_query_cancel` when needed.

You can also list past results with `amc_query_results_find`.

Saved SQL lives in workflows (`amc_workflows_find` / `amc_workflows_create` / `amc_workflows_update` / `amc_workflows_delete`). Create, update, and delete return accepted operation state — poll `amc_operation_get`. Updates and deletes require the latest `expectedStateHash` from `amc_workflows_find`.

### Using API

> The easiest way to run AMC with the API is to paste [this page URL](/hub/docs/datadoe-features/amc.md) into your coding AI agent and ask it to generate the code for you.

Authenticate every REST request with the `datadoe-api-key` header. Do not use `X-Api-Key` or `Authorization`.

```http
POST /api/v1/amc/query-executions
Content-Type: application/json
datadoe-api-key: YOUR_API_KEY
```

1. Set up [your DataDoe API connection](/hub/docs/datadoe-api/how-to-connect).
2. Read the live schema with `GET /amc/schema`.
3. Dry-run with `POST /amc/query-validations` (`sql` or `workflowId`, never both).
4. Start the query with `POST /amc/query-executions`.
5. If `outcome` is `OPERATION`, poll `GET /amc/operations/:operationId` until the operation is terminal. If `recoveryStatus` is `AWAITING_CLIENT_PAYLOAD`, resubmit the **identical** payload and `requestId`.
6. Poll `GET /amc/query-results/:resultId` until `deliveryStatus` is `AVAILABLE`, then download immediately.
7. Cancel with `POST /amc/query-results/:resultId/cancellation` when needed.

List past results with `GET /amc/query-results`. Workflows: `GET|POST /amc/workflows`, `PATCH /amc/workflows/:workflowId`, `POST /amc/workflows/:workflowId/deletion`.

See the [DataDoe API docs](https://api.datadoe.com/api/v1/docs#/AMC) for request and response schemas.

## What do execution and delivery statuses mean?

Each result has two independent statuses:

- **`executionStatus`**: Amazon query progress — `PENDING`, `RUNNING`, `SUCCEEDED`, `FAILED`, `CANCELLED`.
- **`deliveryStatus`**: whether result files are ready — `WAITING`, `AVAILABLE`, `FAILED`, `EXPIRED`, `CANCELLED`.

`rowCount` may be `null` until Amazon reports it.

Cancelling a query whose delivery is still `WAITING` sets `deliveryStatus` to `CANCELLED`. If files are already `AVAILABLE`, delivery is left unchanged. Cancelling an already-terminal result returns an error. Cancel is idempotent after a successful cancel.

Empty privacy-threshold results are ordinary result files.

## What should I know about workflow ids?

DataDoe workflow ids must match `AMC_SLUG_PATTERN`: lowercase alphanumeric characters and `-` only, 1–64 characters. Amazon also allows `_` and `.`; those ids cannot be addressed through DataDoe. `amc_workflows_find` / `GET /amc/workflows` omit invalid ids and workflows without SQL. `meta.skippedCount` is how many rows were omitted from `data`.
