Campaigns

Marketing campaigns, marketing events, and subscriptions.

Queries

searchMarketingEvents

Searches MarketingEvents

Arguments

  • after (String) — A cursor to search after (only include first & after or last & before)
  • before (String) — A cursor to search before (only include first & after or last & before)
  • filters ([SearchFilterInput!]) — A set of filters to apply
  • first (Int) — The number of results to fetch when searching forward (only include first & after or last & before)
  • last (Int) — The number of results to fetch when searching backward (only include first & after or last & before)
  • range (DateRangeInput) — A date range to filter results
  • search (String) — A search query to filter results
  • sortBy (SortMarketingEventsBy) — The sort key
  • sortDir (SortDirection) — The sort direction

Returns: MarketingEventConnection! — A connection to a list of items.

searchMarketingSubscriptions

Searches MarketingSubscriptions

Arguments

  • after (String) — A cursor to search after (only include first & after or last & before)
  • before (String) — A cursor to search before (only include first & after or last & before)
  • filters ([SearchFilterInput!]) — A set of filters to apply
  • first (Int) — The number of results to fetch when searching forward (only include first & after or last & before)
  • last (Int) — The number of results to fetch when searching backward (only include first & after or last & before)
  • search (String) — A search query to filter results
  • sortBy (SortMarketingSubscriptionsBy) — The sort key
  • sortDir (SortDirection) — The sort direction

Returns: MarketingSubscriptionConnection! — A connection to a list of items.

Objects

Campaign

Fields

  • created_at (DateTime!) — The date the Campaign was created
  • deleted_at (DateTime) — The date the Campaign was deletd
  • description (String!) — The description of the Campaign
  • id (ID!) — The unique identifier of the Campaign
  • statistics (CampaignStatistics) — The statistics of the Campaign
  • statistics_updated_at (DateTime) — The date the Campaign statistics were last updated
  • status (CampaignStatus!) — The status of the Campaign
  • tags ([String!]!) — The tags of the Campaign
  • title (String!) — The title of the Campaign
  • updated_at (DateTime!) — The date the Campaign was last updated
  • utm_code (String!) — The UTM code of the Campaign
  • version (Int!) — The campaign version
  • web_url (URL!) — The URL to the Campaign inside the web application — 🚧 Deprecated: No longer supported

CampaignDraft

A draft variation of a Campaign

Fields

  • campaign (Campaign!) — The Campaign that the CampaignDraft belongs to
  • created_at (DateTime!) — The date and time the CampaignDraft was created
  • deleted_at (DateTime) — The date and time the CampaignDraft was deleted
  • id (ID!) — The ID of the CampaignDraft
  • is_default (Boolean) — 🚧 Deprecated: There's no longer a concept of a default draft
  • updated_at (DateTime!) — The date and time the CampaignDraft was last updated
  • variation_name (String) — The name of the CampaignDraft variation
  • variation_utm_code (String) — The UTM code of the CampaignDraft variation

CampaignStatistics

Fields

EmailMarketingSubscription

The marketing consent status of an email address

Fields

  • created_at (DateTime!) — The date the MarketingSubscription was created
  • deleted_at (DateTime) — The date the MarketingSubscription was deleted
  • email_address (String!) — The email address of the MarketingSubscription
  • external_id (ID!) — The unique identifier of the MarketingSubscription
  • id (ID!) — The unique identifier of the MarketingSubscription
  • integration (Integration!) — The integration that the MarketingSubscription belongs to
  • source_integrated_customer (IntegratedCustomer) — The IntegratedCustomer that the MarketingSubscription was generated from
  • status (MarketingSubscriptionStatus!) — The status of the MarketingSubscription
  • suppression_reason (MessagingSubscriptionSuppressionReason) — The reason the MarketingSubscription was suppressed
  • unsubscribe_reason (MessagingSubscriptionUnsubscribeReason) — The reason the MarketingSubscription was unsubscribed
  • updated_at (DateTime!) — The date the MarketingSubscription was last updated

InboundEmailMarketingEvent

An inbound email

Fields

  • body (String) — The body of the MarketingEvent
  • campaign_name (String) — The campaign name of the MarketingEvent
  • created_at (DateTime!) — The date the MarketingEvent was created
  • deleted_at (DateTime) — The date the MarketingEvent was deleted
  • email_address (String!) — The email address of the MarketingEvent
  • id (ID!) — The unique identifier of the MarketingEvent
  • integration (Integration!) — The integration that the MarketingEvent belongs to
  • subject (String) — The subject of the MarketingEvent
  • updated_at (DateTime!) — The date the MarketingEvent was last updated

InboundSmsMarketingEvent

An inbound sms

Fields

  • body (String) — The body of the MarketingEvent
  • campaign_name (String) — The campaign name of the MarketingEvent
  • created_at (DateTime!) — The date the MarketingEvent was created
  • deleted_at (DateTime) — The date the MarketingEvent was deleted
  • id (ID!) — The unique identifier of the MarketingEvent
  • integration (Integration!) — The integration that the MarketingEvent belongs to
  • phone_number (String!) — The phone number of the MarketingEvent
  • updated_at (DateTime!) — The date the MarketingEvent was last updated

MarketingEventConnection

A connection to a list of items.

Fields

MarketingEventEdge

An edge in a connection.

Fields

  • cursor (String!) — A cursor for use in pagination
  • node (MarketingEvent) — The item at the end of the edge

MarketingSubscriptionConnection

A connection to a list of items.

Fields

MarketingSubscriptionEdge

An edge in a connection.

Fields

MessagingSubscription

The messaging subscription status of an email address or phone number

Fields

  • brand (Brand!) — The brand of the MessagingSubscription
  • caused_by_message (Message) — The Message that triggered the latest change to the MessagingSubscription
  • concurrency_key (String!) — The concurrency key of the MessagingSubscription
  • contact (String!) — The email address or phone number of the MessagingSubscription
  • created_at (DateTime!) — The date the MessagingSubscription was created
  • id (ID!) — The unique identifier of the MessagingSubscription — 🚧 Deprecated: Use contact instead
  • previously_subscribed_at (DateTime) — The date the MessagingSubscription was last subscribed
  • reason (MessagingSubscriptionSuppressionReason) — The reason the MessagingSubscription was suppressed — 🚧 Deprecated: Use suppression_reason instead
  • status (MessagingSubscriptionStatus!) — The status of the MessagingSubscription
  • status_updated_at (DateTime!) — The date the MessagingSubscription status change occurred
  • suppression_reason (MessagingSubscriptionSuppressionReason) — The reason the MessagingSubscription was suppressed
  • suppression_status_updated_at (DateTime) — The date the MessagingSubscription suppression status change occurred
  • type (MessagingSubscriptionContactType!) — The contact type of the MessagingSubscription
  • unsubscribe_reason (MessagingSubscriptionUnsubscribeReason) — The reason the MessagingSubscription was unsubscribed
  • updated_at (DateTime!) — The date the MessagingSubscription was last updated

OutboundEmailMarketingEvent

An outbound email

Fields

  • body (String) — The body of the MarketingEvent
  • campaign_name (String) — The campaign name of the MarketingEvent
  • created_at (DateTime!) — The date the MarketingEvent was created
  • deleted_at (DateTime) — The date the MarketingEvent was deleted
  • email_address (String!) — The email address of the MarketingEvent
  • id (ID!) — The unique identifier of the MarketingEvent
  • integration (Integration!) — The integration that the MarketingEvent belongs to
  • subject (String) — The subject of the MarketingEvent
  • updated_at (DateTime!) — The date the MarketingEvent was last updated

OutboundSmsMarketingEvent

An outbound sms

Fields

  • body (String) — The body of the MarketingEvent
  • campaign_name (String) — The campaign name of the MarketingEvent
  • created_at (DateTime!) — The date the MarketingEvent was created
  • deleted_at (DateTime) — The date the MarketingEvent was deleted
  • id (ID!) — The unique identifier of the MarketingEvent
  • integration (Integration!) — The integration that the MarketingEvent belongs to
  • phone_number (String!) — The phone number of the MarketingEvent
  • subject (String) — The subject of the MarketingEvent
  • updated_at (DateTime!) — The date the MarketingEvent was last updated

SmsMarketingSubscription

The marketing consent status of an phone number

Fields

  • created_at (DateTime!) — The date the MarketingSubscription was created
  • deleted_at (DateTime) — The date the MarketingSubscription was deleted
  • external_id (ID!) — The unique identifier of the MarketingSubscription
  • id (ID!) — The unique identifier of the MarketingSubscription
  • integration (Integration!) — The integration that the MarketingSubscription belongs to
  • phone_number (String!) — The phone number of the MarketingSubscription
  • source_integrated_customer (IntegratedCustomer) — The IntegratedCustomer that the MarketingSubscription was generated from
  • status (MarketingSubscriptionStatus!) — The status of the MarketingSubscription
  • suppression_reason (MessagingSubscriptionSuppressionReason) — The reason the MarketingSubscription was suppressed
  • unsubscribe_reason (MessagingSubscriptionUnsubscribeReason) — The reason the MarketingSubscription was unsubscribed
  • updated_at (DateTime!) — The date the MarketingSubscription was last updated

Interfaces

MarketingEventInterface

Fields

  • created_at (DateTime!) — The date the MarketingEvent was created
  • deleted_at (DateTime) — The date the MarketingEvent was deleted
  • id (ID!) — The unique identifier of the MarketingEvent
  • integration (Integration!) — The integration that the MarketingEvent belongs to
  • updated_at (DateTime!) — The date the MarketingEvent was last updated

Implemented by

MarketingSubscriptionInterface

Fields

  • created_at (DateTime!) — The date the MarketingSubscription was created
  • deleted_at (DateTime) — The date the MarketingSubscription was deleted
  • external_id (ID!) — The unique identifier of the MarketingSubscription
  • id (ID!) — The unique identifier of the MarketingSubscription
  • integration (Integration!) — The integration that the MarketingSubscription belongs to
  • source_integrated_customer (IntegratedCustomer) — The IntegratedCustomer that the MarketingSubscription was generated from
  • status (MarketingSubscriptionStatus!) — The status of the MarketingSubscription
  • suppression_reason (MessagingSubscriptionSuppressionReason) — The reason the MarketingSubscription was suppressed
  • unsubscribe_reason (MessagingSubscriptionUnsubscribeReason) — The reason the MarketingSubscription was unsubscribed
  • updated_at (DateTime!) — The date the MarketingSubscription was last updated

Implemented by

Unions

MarketingEvent

Possible types

MarketingSubscription

Possible types

Input Objects

ExternalMarketingEventInput

An ExternalMarketingEvent to be added/updated

Fields

  • body (String) — The body of the ExternalMarketingEvent
  • campaign_name (String) — The campaign name of the ExternalMarketingEvent
  • created_at (DateTime!) — The date the ExternalMarketingEvent was created
  • customer_id (ID) — The unique identifier of the ExternalCustomer associated with the ExternalMarketingEvent
  • deleted_at (DateTime) — The date the ExternalMarketingEvent was deleted
  • direction (ExternalMarketingEventDirection!) — The direction of the ExternalMarketingEvent
  • email_address (String) — The email address of the ExternalMarketingEvent
  • id (ID!) — The unique identifier of the ExternalMarketingEvent
  • phone_number (String) — The phone number of the ExternalMarketingEvent
  • subject (String) — The subject of the ExternalMarketingEvent
  • updated_at (DateTime) — The date the ExternalMarketingEvent was last updated

ExternalMarketingSubscriptionInput

An ExternalMarketingSubscription to be added/updated

Fields

  • created_at (DateTime!) — The date the ExternalMarketingSubscription was created
  • deleted_at (DateTime) — The date the ExternalMarketingSubscription was deleted
  • email_address (EmailAddress) — The email address of the ExternalMarketingSubscription
  • phone_number (String) — The phone number of the ExternalMarketingSubscription
  • status (ExternalMarketingSubscriptionStatus!) — The status of the ExternalMarketingSubscription
  • updated_at (DateTime!) — The date the ExternalMarketingSubscription was last updated

Enums

CampaignStatus

Values

  • ACTIVE
  • PAUSED

ExternalMarketingEventDirection

Values

  • INBOUND
  • OUTBOUND

ExternalMarketingSubscriptionStatus

Values

  • SUBSCRIBED
  • UNSUBSCRIBED

MarketingSubscriptionStatus

Values

  • NOT_DEFINED — The customer's marketing state is not defined.
  • SUBSCRIBED — The customer is subscribed to marketing.
  • SUPPRESSED — The customer is suppressed from marketing and can't be re-subscribed without an explicit override.
  • UNSUBSCRIBED — The customer isn't currently subscribed to marketing but was previously subscribed or has been suppressed.

MessagingSubscriptionContactType

Values

  • EMAIL_ADDRESS
  • PHONE_NUMBER

MessagingSubscriptionStatus

Values

  • NOT_DEFINED — The customer is not subscribed to marketing.
  • SUBSCRIBED — The customer is subscribed to marketing.
  • SUPPRESSED — The customer is suppressed from marketing and can't be re-subscribed without an explicit override.
  • UNSUBSCRIBED — The customer is unsubscribed from marketing.

MessagingSubscriptionSuppressionReason

Values

  • DATA_DELETION_REQUEST — The email address or phone number was suppressed due to a data deletion request.
  • MANUAL_SUPPRESSION — The email address or phone number was manually suppressed.

MessagingSubscriptionUnsubscribeReason

Values

  • CUSTOMER_INITIATED_NON_REVERSIBLE — The customer unsubscribed from marketing and cannot be re-subscribed.
  • CUSTOMER_INITIATED_REVERSIBLE — The customer unsubscribed from marketing and can be re-subscribed.
  • HARD_BOUNCE — The email address or phone number is unable to receive messages.
  • MANUAL_UNSUBSCRIBE — The email address or phone number was manually unsubscribed.
  • SPAM_COMPLAINT — The owner of the email address or phone number reported a message as spam.

SortMarketingEventsBy

The available keys to sort MarketingEvents

Values

  • CREATED_AT
  • UPDATED_AT

SortMarketingSubscriptionsBy

The available keys to sort MarketingSubscriptions

Values

  • CREATED_AT
  • UPDATED_AT