> ## 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.

# messageDecisions

> Why Redo did or didn't message shoppers: each decision to send, skip, wait or branch, newest first. Filters combine with AND.

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

## Arguments

**after** `String`

Read decisions older than this cursor, from `pageInfo.endCursor`.

**before** `String`

Read decisions newer than this cursor, from `pageInfo.startCursor`.

**definitionId** `ID`

Only decisions of this campaign or marketing automation: its `id` or `legacyId`.

**first** `Int`

Page size reading older decisions (default 25, max 100).

**identifier** `String`

Only decisions that used this shopper identifier, like `email:jane@example.com` or `phoneNumber:+15555550100`.

**last** `Int`

Page size reading newer decisions (default 25, max 100).

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

Only decisions at or after this instant.

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

Only decisions before this instant.

**outcome** `[MessageDecisionOutcome](/docs/api-reference/v3/reference/marketing/message-decision-outcome)`

Only decisions with this outcome.

**reason** `[MessageDecisionReason](/docs/api-reference/v3/reference/marketing/message-decision-reason)`

Only decisions with this reason.

## Returns

**messageDecisions** `[MessageDecisionConnection!](/docs/api-reference/v3/pagination)` *required*

A paginated list of MessageDecision items.

**fields**

**edges** `[\[MessageDecisionEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** `[MessageDecision!](/docs/api-reference/v3/reference/marketing/message-decision)` *required*

The item at this edge.

**fields**

**automation** `[MarketingAutomation](/docs/api-reference/v3/reference/marketing/marketing-automation)`

The marketing automation the decision belongs to, if any.

**automationRunId** `String`

The automation run the decision was part of.

**automationStepId** `String`

The automation step that decided.

**campaign** `[Campaign](/docs/api-reference/v3/reference/marketing/campaign)`

The campaign the decision belongs to, if any.

**channel** `[MarketingChannel](/docs/api-reference/v3/reference/marketing/marketing-channel)`

The channel of the message decided on. Null when the decision wasn't about one channel.

**customer** `[Customer](/docs/api-reference/v3/reference/customers/customer)`

The customer record Redo used. Null when Redo decided from a phone number or email alone.

**definitionKind** `[MessageDecisionDefinitionKind!](/docs/api-reference/v3/reference/marketing/message-decision-definition-kind)` *required*

What the decision belongs to.

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

When the campaign or automation had last been edited as of this decision, so you can tell which version decided. Null when unknown.

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

The id of this decision.

**identifiers** `[String!]!` *required*

The shopper's identifiers the decision used, like `email:jane@example.com` or `phoneNumber:+15555550100`.

**inputs** `[JSON!](/docs/api-reference/v3/reference/common/json)` *required*

The facts the decision used, like the quiet hours window. Their shape depends on the reason.

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

When Redo decided.

**outcome** `[MessageDecisionOutcome!](/docs/api-reference/v3/reference/marketing/message-decision-outcome)` *required*

Which way the decision went.

**reason** `[MessageDecisionReason!](/docs/api-reference/v3/reference/marketing/message-decision-reason)` *required*

Why the decision went that way.

**reasonDescription** `String!` *required*

What `reason` means, in plain words.

**references** `[String!]!` *required*

Other Redo objects the decision used, like `subscribe-keyword:<id>`.

**sendId** `String`

The one message to one shopper the decision was about. Every decision about that message shares it.

**nodes** `[\[MessageDecision!\]!](/docs/api-reference/v3/reference/marketing/message-decision)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

**automation** `[MarketingAutomation](/docs/api-reference/v3/reference/marketing/marketing-automation)`

The marketing automation the decision belongs to, if any.

**fields**

**analytics** `[MarketingAutomationAnalytics!](/docs/api-reference/v3/reference/marketing/marketing-automation-analytics)` *required*

Analytics for this marketing automation, grouped by what is being measured.

**category** `[MarketingAutomationCategory!](/docs/api-reference/v3/reference/marketing/marketing-automation-category)` *required*

Which trigger family this marketing automation belongs to.

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

When the automation was created.

**description** `String`

The merchant's description of what this automation does.

**enabled** `Boolean!` *required*

Whether the automation is currently running.

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

The id of this automation.

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

The automation's legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.

**name** `String!` *required*

The merchant-facing name of the automation.

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

When the current version was published. Null while it has only ever been a draft.

**steps** `[\[MarketingAutomationStep!\]!](/docs/api-reference/v3/reference/marketing/marketing-automation-step)` *required*

The nodes that make up this automation, including graph edges as step ids. A type this API version does not model field-by-field is returned as MarketingAutomationUnknownStep.

**stepsJson** `[\[JSON!\]!](/docs/api-reference/v3/reference/common/json)` *required*

`steps` with every field selected, as JSON: one element per step, with `__typename`. Null and invalid stored steps are \[]. Webhook header values and OAuth client secrets are omitted. Edits go through operations.

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

When the automation was last updated.

**automationRunId** `String`

The automation run the decision was part of.

**automationStepId** `String`

The automation step that decided.

**campaign** `[Campaign](/docs/api-reference/v3/reference/marketing/campaign)`

The campaign the decision belongs to, if any.

**fields**

**analytics** `[CampaignAnalytics!](/docs/api-reference/v3/reference/marketing/campaign-analytics)` *required*

Analytics for this campaign, grouped by what is being measured.

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

When the merchant canceled the campaign, if they did.

**channel** `[MarketingChannel!](/docs/api-reference/v3/reference/marketing/marketing-channel)` *required*

The channel this campaign sends on.

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

When the campaign was created.

**emailVariants** `[\[CampaignEmailVariant!\]!](/docs/api-reference/v3/reference/marketing/campaign-email-variant)` *required*

The email content this campaign sends, oldest arm first. A campaign that is not split-testing has exactly one entry; there is no separate `subject` on the campaign because a split test has more than one.

**errorCode** `[CampaignErrorCode](/docs/api-reference/v3/reference/marketing/campaign-error-code)`

Why the campaign failed, when it did.

**excludedSegments** `[\[Segment!\]!](/docs/api-reference/v3/reference/marketing/segment)` *required*

The segments held out of this campaign.

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

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

When the campaign failed to send, if it did.

**followUpConfig** `[CampaignFollowUpConfig](/docs/api-reference/v3/reference/marketing/campaign-follow-up-config)`

Follow-up email configuration when one was enabled.

**fromAddress** `[EmailAddress](/docs/api-reference/v3/reference/marketing/email-address)`

The from address recorded when the campaign sent. Null for drafts and for SMS campaigns.

**fromSender** `[EmailSender](/docs/api-reference/v3/reference/marketing/email-sender)`

The From mailbox chosen for this campaign. Null when the store default should be used, and for SMS.

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

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

The id of this campaign.

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

The campaign's legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.

**name** `String!` *required*

The merchant-facing name of the campaign.

**replyToAddress** `[EmailAddress](/docs/api-reference/v3/reference/marketing/email-address)`

The reply-to address recorded when the campaign sent. Null when none was set.

**replyToSender** `[EmailSender](/docs/api-reference/v3/reference/marketing/email-sender)`

The Reply-To mailbox chosen for this campaign. Null when the store default should be used.

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

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

When the campaign is scheduled to start sending. Null for drafts, and for campaigns scheduled in each recipient's local time.

**scheduledAtTimeZone** `String`

IANA time zone the merchant picked when scheduling a single UTC instant. Null for drafts and local-time sends.

**scheduledLocalFallbackTimeZone** `String`

IANA time zone used when a recipient has no time zone, for local-time sends. Null when `scheduledAt` is set.

**scheduledLocalTime** `String`

For campaigns scheduled in each recipient's local time, the wall-clock time they send at, as `YYYY-MM-DDTHH:mm:ss`. Null when `scheduledAt` is set.

**segments** `[\[Segment!\]!](/docs/api-reference/v3/reference/marketing/segment)` *required*

The segments this campaign was sent to.

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

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

When the campaign finished sending. Null until it has finished.

**smsVariants** `[\[CampaignSmsVariant!\]!](/docs/api-reference/v3/reference/marketing/campaign-sms-variant)` *required*

The SMS content this campaign sends, oldest arm first. Empty for email campaigns.

**status** `[CampaignStatus!](/docs/api-reference/v3/reference/marketing/campaign-status)` *required*

Derived lifecycle status from schedule, send, failure, and cancellation timestamps.

**tags** `[String!]!` *required*

Tags the merchant applied to this campaign, in the order they applied them. Free-form and merchant-defined — Redo attaches no meaning to them, so they are the place a store's own categorisation (a promotion name, a season, a product line) is kept. Empty when the campaign is untagged.

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

When the campaign was last updated.

**channel** `[MarketingChannel](/docs/api-reference/v3/reference/marketing/marketing-channel)`

The channel of the message decided on. Null when the decision wasn't about one channel.

**customer** `[Customer](/docs/api-reference/v3/reference/customers/customer)`

The customer record Redo used. Null when Redo decided from a phone number or email alone.

**fields**

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

When the customer record was created.

**customFields** `[JSON](/docs/api-reference/v3/reference/common/json)`

Merchant-defined custom field values, keyed by each field's name. Null when the customer has no custom fields set.

**email** `String`

The customer's primary email address.

**firstName** `String`

The customer's first name.

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

The id of this customer.

**lastName** `String`

The customer's last name.

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

The customer's legacy identifier (the source Mongo ObjectId), accepted anywhere an `id` is.

**location** `[CustomerLocation](/docs/api-reference/v3/reference/customers/customer-location)`

The customer's current location, if known.

**phoneNumber** `String`

The customer's primary phone number.

**supportTickets** `[SupportTicketConnection!](/docs/api-reference/v3/pagination)` *required*

The help desk tickets this customer is the primary contact on any thread of, newest first. Every ticket whose `customer` is this customer is here.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns tickets after it.

**before** `String`

Backward pagination cursor — returns tickets before it.

**first** `Int`

Forward pagination: returns the first N tickets (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N tickets (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

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

When the customer record was last updated.

**definitionKind** `[MessageDecisionDefinitionKind!](/docs/api-reference/v3/reference/marketing/message-decision-definition-kind)` *required*

What the decision belongs to.

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

When the campaign or automation had last been edited as of this decision, so you can tell which version decided. Null when unknown.

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

The id of this decision.

**identifiers** `[String!]!` *required*

The shopper's identifiers the decision used, like `email:jane@example.com` or `phoneNumber:+15555550100`.

**inputs** `[JSON!](/docs/api-reference/v3/reference/common/json)` *required*

The facts the decision used, like the quiet hours window. Their shape depends on the reason.

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

When Redo decided.

**outcome** `[MessageDecisionOutcome!](/docs/api-reference/v3/reference/marketing/message-decision-outcome)` *required*

Which way the decision went.

**reason** `[MessageDecisionReason!](/docs/api-reference/v3/reference/marketing/message-decision-reason)` *required*

Why the decision went that way.

**reasonDescription** `String!` *required*

What `reason` means, in plain words.

**references** `[String!]!` *required*

Other Redo objects the decision used, like `subscribe-keyword:<id>`.

**sendId** `String`

The one message to one shopper the decision was about. Every decision about that message shares it.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

## Example

```graphql theme={null}
query {
  messageDecisions(after: "...", before: "...", definitionId: "...", first: 10, identifier: "...", last: 10, occurredAfter: "...", occurredBefore: "...", outcome: ALLOWED, reason: AB_TEST_VARIANT) {
    nodes {
      automationRunId
      automationStepId
      channel
      definitionKind
      definitionUpdatedAt
      id
      identifiers
      inputs
      # ...
    }
    pageInfo { hasNextPage endCursor }
  }
}
```


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