campaigns_read
Arguments
ID!
required
The campaign’s
id, or its legacyId from an earlier version of the Redo API.Returns
A one-off marketing send to a set of segments, on a single channel.
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
ArgumentsFields
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.
First day to report on, inclusive, in the store’s timezone. Must be on or before
endDate, and the range may span at most 400 days.required
One entry per day with activity, oldest first. Quiet days are omitted rather than reported as zero.
required
Totals across the whole range. A campaign with no activity reports zero counts and null rates.
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_readShow fields
Show fields
String!
required
The content canvas background, as set under Email styles in the email builder.
String!
required
The email background, as set under Email styles in the email builder.
ID!
required
The id of this template.
String!
required
The template’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
String
The default link color, as set under Email styles in the email builder. Null when the merchant left it unset.
String!
required
The merchant-facing name of the template.
Render this template, to see what recipients get. Use a width of about 375 for a phone.Requires:
marketing_templates_readString
The preview text shown after the subject in an inbox. Null when the merchant left it unset.
required
The blocks that make up the email body, in order. Nested column children keep their own ids. A type this API version does not model field-by-field is returned as EmailTemplateUnknownSection.
sections with every field selected, as JSON: one element per root block, in order, with __typename and nested column children. Empty or unreadable stored sections are []. Edits go through operations.String!
required
The subject line as authored, before per-recipient substitution. A subject containing
{{ }} placeholders is filled in per customer at send time, and some sends prepend a prefix, so this is not necessarily the subject any one customer saw. Empty when the template has no subject of its own.required
The trigger context this template is valid for. Immutable after create. UNKNOWN when the stored trigger is not modeled in this API version.
Why 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_readShow fields
Show fields
Boolean!
required
Whether links in the body are shortened at send time.
String!
required
The SMS body as authored, before per-recipient substitution.
ID!
required
The id of this template.
required
Images sent with the message as MMS, in order. Dynamic product images and contact cards set in the editor are not listed.
String!
required
The template’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
String!
required
The merchant-facing name of the template.
required
The trigger context this template is valid for. Immutable after create. UNKNOWN when the stored trigger is not modeled in this API version.
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.
Example
query {
campaign(id: "...") {
canceledAt
channel
createdAt
errorCode
failedAt
id
legacyId
name
# ...
}
}