campaigns_read
Arguments
String
Forward pagination cursor — returns items after it. Pass an
edges[].cursor or pageInfo.endCursor from a previous page.String
Backward pagination cursor — returns items before it. Pass an
edges[].cursor or pageInfo.startCursor from a previous page.Only include campaigns sending on this channel.
Int
Forward pagination: returns the first N items (max 100, default 25). Use with
after; mutually exclusive with last/before.Int
Backward pagination: returns the last N items (max 100, default 25). Use with
before; mutually exclusive with first/after.Which key to sort by (defaults to the first key, newest-first). Combine with
reverse to flip direction.String
Case-insensitive substring match on the campaign name. At most 200 characters.
Boolean
Reverses the sort direction selected by
orderBy (or its default).Returns
required
A paginated list of Campaign items.
Show fields
Show fields
required
The list of edges (each a node plus its pagination
cursor).Show fields
Show fields
String!
required
Opaque cursor for this item; pass to
after/before to page from here.The item at this edge.
Show fields
Show fields
required
Analytics for this campaign, grouped by what is being measured.
required
The channel this campaign sends on.
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.Why the campaign failed, when it did.
required
The segments held out of this campaign.Requires:
segments_readFollow-up email configuration when one was enabled.
The from address recorded when the campaign sent. Null for drafts and for SMS campaigns.
The From mailbox chosen for this campaign. Null when the store default should be used, and for SMS.Requires:
campaigns_readID!
required
The id of this campaign.
String!
required
The campaign’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
String!
required
The merchant-facing name of the campaign.
The reply-to address recorded when the campaign sent. Null when none was set.
The Reply-To mailbox chosen for this campaign. Null when the store default should be used.Requires:
campaigns_readWhen the campaign is scheduled to start sending. Null for drafts, and for campaigns scheduled in each recipient’s local time.
String
IANA time zone the merchant picked when scheduling a single UTC instant. Null for drafts and local-time sends.
String
IANA time zone used when a recipient has no time zone, for local-time sends. Null when
scheduledAt is set.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.required
The segments this campaign was sent to.Requires:
segments_readrequired
The SMS content this campaign sends, oldest arm first. Empty for email campaigns.
required
Derived lifecycle status from schedule, send, failure, and cancellation timestamps.
[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.
required
The nodes in this page, without the edge/cursor wrapper — a convenience over
edges.Show fields
Show fields
required
Analytics for this campaign, grouped by what is being measured.
Show fields
Show fields
required
Email and SMS performance, read from the analytics warehouse: what was sent, how it was engaged with, and the orders and revenue attributed to it.Requires:
campaigns_analytics_readShow fields
Show fields
Arguments
Int
How many days after a message an order still counts toward it, 1-30.
Last day to report on, inclusive, in the store’s timezone. The range may span at most 400 days.
required
The channel this campaign sends on.
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.Show fields
Show fields
Float!
required
The share of recipients this variant was sent to. A campaign with a single variant weights it 1.
Int!
required
This variant’s position within the campaign, starting at 0. Stable, so it names an arm of a split test across reports.
The content this variant sent. Null when the template has since been deleted.Requires:
marketing_templates_readWhy the campaign failed, when it did.
required
The segments held out of this campaign.Requires:
segments_readShow fields
Show fields
String
The merchant’s description of who this segment is for.
Int
Members subscribed to email marketing as of
countsRefreshedAt.ID!
required
The id of this segment.
String!
required
The segment’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
Int
Customers in the segment as of
countsRefreshedAt. Null until it has first been counted.String!
required
The merchant-facing name of the segment.
Int
Members subscribed to SMS marketing as of
countsRefreshedAt.required
How membership of this segment is determined.
Follow-up email configuration when one was enabled.
Show fields
Show fields
Float
Delay after the original send before the follow-up goes out.
Boolean!
required
Whether a follow-up send is configured.
Engagement window, in days, used to pick recipients.
String
Legacy Mongo ObjectId of the campaign this follow-up was created from.
String
Subject line for the follow-up email.
The From mailbox chosen for this campaign. Null when the store default should be used, and for SMS.Requires:
campaigns_readID!
required
The id of this campaign.
String!
required
The campaign’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
String!
required
The merchant-facing name of the campaign.
The Reply-To mailbox chosen for this campaign. Null when the store default should be used.Requires:
campaigns_readWhen the campaign is scheduled to start sending. Null for drafts, and for campaigns scheduled in each recipient’s local time.
String
IANA time zone the merchant picked when scheduling a single UTC instant. Null for drafts and local-time sends.
String
IANA time zone used when a recipient has no time zone, for local-time sends. Null when
scheduledAt is set.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.required
The segments this campaign was sent to.Requires:
segments_readShow fields
Show fields
String
The merchant’s description of who this segment is for.
Int
Members subscribed to email marketing as of
countsRefreshedAt.ID!
required
The id of this segment.
String!
required
The segment’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
Int
Customers in the segment as of
countsRefreshedAt. Null until it has first been counted.String!
required
The merchant-facing name of the segment.
Int
Members subscribed to SMS marketing as of
countsRefreshedAt.required
How membership of this segment is determined.
required
The SMS content this campaign sends, oldest arm first. Empty for email campaigns.
Show fields
Show fields
Float!
required
The share of recipients this variant was sent to. A campaign with a single variant weights it 1.
Int!
required
This variant’s position within the campaign, starting at 0.
The content this variant sent. Null when the template has since been deleted.Requires:
marketing_templates_readrequired
Derived lifecycle status from schedule, send, failure, and cancellation timestamps.
[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.
Pagination metadata for the current page.
Show fields
Show fields
String
Cursor of the last edge in this page; pass to
after to page forward.Boolean!
required
Whether more items exist after this page (drives forward pagination with
first/after).Boolean!
required
Whether more items exist before this page (drives backward pagination with
last/before).String
Cursor of the first edge in this page; pass to
before to page backward.Example
query {
campaigns(after: "...", before: "...", channel: EMAIL, first: 10, last: 10, orderBy: CREATED_AT, query: "...", reverse: true, sentAfter: "...", sentBefore: "...") {
nodes {
canceledAt
channel
createdAt
errorCode
failedAt
id
legacyId
name
# ...
}
pageInfo { hasNextPage endCursor }
}
}