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

# trackingPageFlowUpdate

> Replace the whole tracking page flow, creating it when the store has none. Shoppers are routed by it at once, and the last write wins. Two first saves at the same moment can each create a flow, and only one routes shoppers. A broken rule returns INVALID_STEP_PAYLOAD with `extensions.stepId`; a tracking page the store doesn't have returns NOT_FOUND.

**Required scopes:** [`tracking_pages_write`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-tracking_pages_write)

**Store must have one of:** `ORDER_TRACKING`

## Arguments

**input** `[TrackingPageFlowInput!](/docs/api-reference/v3/reference/marketing/tracking-page-flow-input)` *required*

The whole flow.

**fields**

**entryStepId** `ID`

The first step a shopper reaches. Null routes no one: every shopper sees the store's default tracking page.

**steps** `[\[TrackingPageFlowStepInput!\]!](/docs/api-reference/v3/reference/marketing/tracking-page-flow-step-input)` *required*

Every step of the flow.

**fields**

**abTest** `[TrackingPageFlowAbTestInput](/docs/api-reference/v3/reference/marketing/tracking-page-flow-ab-test-input)`

Makes the step an A/B test.

**condition** `[TrackingPageFlowConditionInput](/docs/api-reference/v3/reference/marketing/tracking-page-flow-condition-input)`

Makes the step a condition.

**id** `ID!` *required*

Any id, unique in the flow. Other steps and `entryStepId` name the step by it.

**page** `[TrackingPageFlowPageInput](/docs/api-reference/v3/reference/marketing/tracking-page-flow-page-input)`

Makes the step a tracking page.

## Returns

**trackingPageFlowUpdate** `[TrackingPageFlow!](/docs/api-reference/v3/reference/marketing/tracking-page-flow)` *required*

The flow of conditions and A/B tests that picks which tracking page each shopper sees. A step points to the steps after it by id; a tracking page step ends its path.

**fields**

**entryStepId** `ID`

The first step a shopper reaches. Null when no shopper is routed and every shopper sees the store's default tracking page.

**id** `ID!` *required*

The id of this flow.

**legacyId** `String!` *required*

Mongo ObjectId from the merchant app.

**steps** `[\[TrackingPageFlowStep!\]!](/docs/api-reference/v3/reference/marketing/tracking-page-flow-step)` *required*

Every step, in stored order. Empty when the stored flow can't be read; shoppers then see the default page.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the flow was last saved.

## Example

```graphql theme={null}
mutation {
  trackingPageFlowUpdate(input: { ... }) {
    entryStepId
    id
    legacyId
    updatedAt
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.