Required scopes: campaigns_read , campaigns_write
Analytics for this campaign, grouped by what is being measured. 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_readArguments 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.
Fields One entry per day with activity, oldest first. Quiet days are omitted rather than reported as zero.
Totals across the whole range. A campaign with no activity reports zero counts and null rates.
When the merchant canceled the campaign, if they did.
The channel this campaign sends on.
When the campaign was created.
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. The share of recipients this variant was sent to. A campaign with a single variant weights it 1.
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_readThe content canvas background, as set under Email styles in the email builder.
When the template was created.
The email background, as set under Email styles in the email builder.
The template’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
The default link color, as set under Email styles in the email builder. Null when the merchant left it unset.
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_readArguments Render with this recent event’s data instead of sample data: a 24-character hex event id. A well-formed id that can’t be found falls back to sample data.
Viewport width of the screenshot, 320-1200 pixels.
The preview text shown after the subject in an inbox. Null when the merchant left it unset.
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.
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.
The trigger context this template is valid for. Immutable after create. UNKNOWN when the stored trigger is not modeled in this API version.
When the template was last edited. Templates stay editable after the campaigns that used them have finished, so compare this against a campaign’s finishedAt to tell whether the content here is still what that campaign actually sent.
Why the campaign failed, when it did.
The segments held out of this campaign. Requires: segments_readDynamic segment condition tree. Null for static and persona segments.
When the member counts were last recalculated. They are not live.
When the segment was created.
The merchant’s description of who this segment is for.
Members subscribed to email marketing as of countsRefreshedAt.
The segment’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
Customers in the segment as of countsRefreshedAt. Null until it has first been counted.
The merchant-facing name of the segment.
Members subscribed to SMS marketing as of countsRefreshedAt.
How membership of this segment is determined.
When the segment was last updated.
When the campaign failed to send, if it did.
Follow-up email configuration when one was enabled. Delay after the original send before the follow-up goes out.
Whether a follow-up send is configured.
Engagement window, in days, used to pick recipients.
Legacy Mongo ObjectId of the campaign this follow-up was created from.
Subject line for the follow-up email.
The from address recorded when the campaign sent. Null for drafts and for SMS campaigns. The display name shown alongside the address.
The From mailbox chosen for this campaign. Null when the store default should be used, and for SMS. Requires: campaigns_readWhen the address was added.
The id of this sender address. Pass it to updateCampaign.
The display name shown alongside the address.
The campaign’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
The merchant-facing name of the campaign.
The reply-to address recorded when the campaign sent. Null when none was set. The display name shown alongside the address.
The Reply-To mailbox chosen for this campaign. Null when the store default should be used. Requires: campaigns_readWhen the address was added.
The id of this sender address. Pass it to updateCampaign.
The display name shown alongside the address.
When the campaign is scheduled to start sending. Null for drafts, and for campaigns scheduled in each recipient’s local time.
IANA time zone the merchant picked when scheduling a single UTC instant. Null for drafts and local-time sends.
scheduledLocalFallbackTimeZone IANA time zone used when a recipient has no time zone, for local-time sends. Null when scheduledAt is set.
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.
The segments this campaign was sent to. Requires: segments_readDynamic segment condition tree. Null for static and persona segments.
When the member counts were last recalculated. They are not live.
When the segment was created.
The merchant’s description of who this segment is for.
Members subscribed to email marketing as of countsRefreshedAt.
The segment’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
Customers in the segment as of countsRefreshedAt. Null until it has first been counted.
The merchant-facing name of the segment.
Members subscribed to SMS marketing as of countsRefreshedAt.
How membership of this segment is determined.
When the segment was last updated.
When the campaign finished sending. Null until it has finished.
The SMS content this campaign sends, oldest arm first. Empty for email campaigns. The share of recipients this variant was sent to. A campaign with a single variant weights it 1.
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_readWhether links in the body are shortened at send time.
The SMS body as authored , before per-recipient substitution.
When the template was created.
Images sent with the message as MMS, in order. Dynamic product images and contact cards set in the editor are not listed.
The template’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
The merchant-facing name of the template.
The trigger context this template is valid for. Immutable after create. UNKNOWN when the stored trigger is not modeled in this API version.
When the template was last edited.
Derived lifecycle status from schedule, send, failure, and cancellation timestamps.
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.
When the campaign was last updated.