Skip to content

Campaign Data Model

🏗️ Primary Entities

Campaigns: Marketing campaigns with configuration, scheduling, and content

Engagement Metrics: Send totals, delivery, opens, clicks, bounces

Attribution: Sales, replies, and reviews attributed to campaigns

🔗 Key Relationships

Many-to-One: Campaign → Shop (each campaign belongs to one shop)

Many-to-One: Campaign → Segment (campaigns grouped by segment)

One-to-Many: Campaign → Marketing Types (each campaign can have multiple marketing types)

Core identification fields linking campaigns to tenants, shops, and segments.

Field NameData TypeDescriptionRequired
STEER_TENANT_IDString (UUID)Unique tenant identifier (parent organization)Yes
STEER_SHOP_IDString (UUID)Shop location identifierYes
CAMPAIGN_IDString (UUID)Unique campaign identifierYes
SEGMENT_IDString (UUID)Campaign group/segment identifierYes

Campaign configuration and classification details.

Field NameData TypeDescriptionRequired
CAMPAIGN_NAMEStringCampaign display nameYes
CAMPAIGN_LIFESTAGEStringCampaign lifecycle stage (distinct from execution status in CAMPAIGN_STATUS)Yes
CAMPAIGN_FREQUENCY_TYPEStringOne-time or repeating campaignYes
CREATED_ATTimestampCampaign creation timestampYes
UPDATED_ATTimestampLast modification timestampYes
CAMPAIGN_PURPOSEStringCampaign purpose/categoryYes
SEGMENT_NAMEStringSegment display nameNo
CAMPAIGN_STATUSStringCurrent campaign execution statusNo
HAS_BEEN_COPIED_TO_OTHER_LOCATIONBooleanWhether this campaign was used as a template for other locationsNo

Channel and delivery configuration.

Field NameData TypeDescriptionRequired
MARKETING_TYPEStringCommunication channelYes
MARKETING_TYPE_ENABLEDBooleanWhether this marketing type is currently enabledYes
MARKETING_TYPE_ARCHIVEDBooleanWhether this marketing type has been archivedYes

Campaign message content.

Field NameData TypeDescriptionRequired
SUBJECTStringEmail subject line (empty for Text campaigns)No
BODY_TEXTStringMessage body text (empty for Email campaigns). May include personalization tokens like {firstName.txt}, {vehicleMm.txt}, {locationName.txt}. The .txt / .ptxt extensions are part of the token syntaxNo

Campaign timing and recurrence configuration.

Field NameData TypeDescriptionRequired
SCHEDULED_ATTimestampFuture scheduled send time (null if not scheduled)No
START_ATTimestampCampaign start dateNo
END_ATTimestampCampaign end date (null for evergreen campaigns)No
REPEAT_FREQUENCYNumberRepeat interval in days (null for one-time campaigns)No

Automated trigger conditions for campaign execution.

Field NameData TypeDescriptionRequired
DAYS_SINCE_DUENumberNumber of days since a vehicle service became due. A service becomes due when a vehicle reaches a configured threshold of days or miles since last service (based on Steer or shop management system settings). This value represents how many days past that due date the vehicle currently isNo
DAYS_SINCE_DUE_TYPEStringTime direction for days since dueNo
DAYS_AFTER_VISITNumberLower bound (start) of the days-after-visit trigger range. Defines the earliest day after a customer visit that the campaign can fireNo
DAYS_AFTER_VISIT_RANGE_ENDNumberUpper bound (end) of the days-after-visit trigger range. Together with DAYS_AFTER_VISIT, defines the window (e.g., DAYS_AFTER_VISIT=3 and DAYS_AFTER_VISIT_RANGE_END=7 means the campaign triggers between 3–7 days after a visit)No
DAYS_SINCE_DEFERREDNumberNumber of days since the customer declined a service recommendation. “Deferred” means the customer was presented with a recommended service and chose not to proceedNo
DAYS_SINCE_DEFERRED_TYPEStringTime direction for days since deferredNo

Settings for revenue and engagement attribution.

Field NameData TypeDescriptionRequired
STEER_ATTRIBUTION_RANGE_DAYNumberThe attribution window — number of days after a campaign is received during which an attribution event (e.g., an invoice, reply, or review) will be tied to that campaign as a success eventNo
ATTRIBUTION_TYPEStringType of attribution tracked for this campaign (Sales, Reviews, or Replies)No

Aggregated send and engagement data from DM_SENT_TOTALS_CAMPAIGN.

Field NameData TypeDescriptionRequired
TOTAL_SENTNumberTotal messages sentNo
DELIVERED_COUNTNumberSuccessfully delivered messagesNo
OPENS_COUNTNumberTotal opens (email only)No
UNIQUE_OPENS_COUNTNumberUnique opens (email only)No
CLICKSNumberTotal link clicks (email only)No
UNIQUE_CLICKSNumberUnique link clicks (email only)No
BOUNCEDNumberBounced messages (email only)No
UNDELIVERED_COUNTNumberUndelivered messagesNo
UNSUBSCRIBED_COUNTNumberRecipients who unsubscribedNo
Field NameData TypeDescriptionRequired
TOTAL_STEER_ATTRIBUTIONNumberAttributed value based on ATTRIBUTION_TYPE: when Sales, this is the total revenue amount; when Reviews, this is the count of attributed reviews; when Replies, this is the count of attributed replies. The attribution is calculated within the window defined by STEER_ATTRIBUTION_RANGE_DAYNo

CAMPAIGN_LIFESTAGE — the lifecycle stage of the campaign (is it live, being built, or retired?):

  • Active: Campaign is currently live and eligible for sending
  • Draft: Campaign is being configured and has not yet been activated
  • Archive: Campaign has been retired and will no longer send

Complete API response example with a campaign record:

{
"data": [
[
"f2e3d4c5-b6a7-8901-2345-6789abcdef01",
"c3d4e5f6-a7b8-9012-3456-789abcdef012",
"d4e5f6a7-b8c9-0123-4567-89abcdef0123",
"e5f6a7b8-c9d0-1234-5678-9abcdef01234",
"Welcome Back Follow-Up",
"Active",
"Repeat",
"2025-06-15T10:30:00Z",
"2025-12-01T14:00:00Z",
"FollowUp",
"Recent Visitors",
"Email",
true,
false,
"We miss you! Come back for a check-up",
null,
null,
"2025-06-15T10:30:00Z",
null,
30,
null,
null,
7,
null,
null,
null,
30,
"Sales",
"Finished",
false,
1250,
1180,
890,
720,
45,
38,
12,
58,
3,
15420.50
]
],
"metadata": {
"rowType": [
{"name": "STEER_TENANT_ID", "type": "text"},
{"name": "STEER_SHOP_ID", "type": "text"},
{"name": "CAMPAIGN_ID", "type": "text"},
{"name": "SEGMENT_ID", "type": "text"},
{"name": "CAMPAIGN_NAME", "type": "text"},
{"name": "CAMPAIGN_LIFESTAGE", "type": "text"},
{"name": "CAMPAIGN_FREQUENCY_TYPE", "type": "text"},
{"name": "CREATED_AT", "type": "timestamp_ntz"},
{"name": "UPDATED_AT", "type": "timestamp_ntz"},
{"name": "CAMPAIGN_PURPOSE", "type": "text"},
{"name": "SEGMENT_NAME", "type": "text"},
{"name": "MARKETING_TYPE", "type": "text"},
{"name": "MARKETING_TYPE_ENABLED", "type": "boolean"},
{"name": "MARKETING_TYPE_ARCHIVED", "type": "boolean"},
{"name": "SUBJECT", "type": "text"},
{"name": "BODY_TEXT", "type": "text"},
{"name": "SCHEDULED_AT", "type": "timestamp_ntz"},
{"name": "START_AT", "type": "timestamp_ntz"},
{"name": "END_AT", "type": "timestamp_ntz"},
{"name": "REPEAT_FREQUENCY", "type": "fixed"},
{"name": "DAYS_SINCE_DUE", "type": "fixed"},
{"name": "DAYS_SINCE_DUE_TYPE", "type": "text"},
{"name": "DAYS_AFTER_VISIT", "type": "fixed"},
{"name": "DAYS_AFTER_VISIT_RANGE_END", "type": "fixed"},
{"name": "DAYS_SINCE_DEFERRED", "type": "fixed"},
{"name": "DAYS_SINCE_DEFERRED_TYPE", "type": "text"},
{"name": "STEER_ATTRIBUTION_RANGE_DAY", "type": "fixed"},
{"name": "ATTRIBUTION_TYPE", "type": "text"},
{"name": "CAMPAIGN_STATUS", "type": "text"},
{"name": "HAS_BEEN_COPIED_TO_OTHER_LOCATION", "type": "boolean"},
{"name": "TOTAL_SENT", "type": "fixed"},
{"name": "DELIVERED_COUNT", "type": "fixed"},
{"name": "OPENS_COUNT", "type": "fixed"},
{"name": "UNIQUE_OPENS_COUNT", "type": "fixed"},
{"name": "CLICKS", "type": "fixed"},
{"name": "UNIQUE_CLICKS", "type": "fixed"},
{"name": "BOUNCED", "type": "fixed"},
{"name": "UNDELIVERED_COUNT", "type": "fixed"},
{"name": "UNSUBSCRIBED_COUNT", "type": "fixed"},
{"name": "TOTAL_STEER_ATTRIBUTION", "type": "real"}
]
}
}