Skip to content

Instantly share code, notes, and snippets.

@mjalvarez
Created October 21, 2025 12:43
Show Gist options
  • Select an option

  • Save mjalvarez/7c4bfb45c80db87e86356c016740b52a to your computer and use it in GitHub Desktop.

Select an option

Save mjalvarez/7c4bfb45c80db87e86356c016740b52a to your computer and use it in GitHub Desktop.
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "http://example.com/example.json",
"type": "object",
"default": {},
"description": "Records when a user unsubscribes from a message. Used for tracking unsubscribes, user engagement, and analyzing campaign performance.",
"title": "Message Unsubscribe Event",
"required": [
"specversion",
"type",
"dataschema",
"id",
"source",
"time",
"event",
"accountId",
"data"
],
"properties": {
"specversion": {
"type": "string",
"default": "1.0",
"const": "1.0",
"description": "CloudEvents specification version. This schema complies with version 1.0 of the CloudEvents specification. This field ensures compatibility with CloudEvents-compliant systems and tools.",
"title": "Schema version",
"outbound": true,
"examples": [
"1.0"
]
},
"type": {
"type": "string",
"default": "event.campaignactivity",
"const": "event.campaignactivity",
"description": "CloudEvents event type classification. Indicates this is a behavioral event that tracks user interactions and activities within the platform. Used for routing and filtering events by domain.",
"title": "Type",
"label": "Campaign Activity",
"outbound": true,
"examples": [
"event.campaignactivity"
]
},
"dataschema": {
"type": "string",
"default": "",
"description": "URI reference to the schema that defines the structure and format of the event data payload. Enables consumers to validate and parse the event data correctly. Format: evt:behavior/v1",
"title": "Data Schema",
"outbound": true,
"examples": [
"evt:campaign/v1"
]
},
"id": {
"type": "string",
"default": "",
"description": "Unique identifier for this specific event instance. Must be unique within the context of the source system. Used for deduplication, correlation, and event tracking across systems. Format: UUID/GUID.",
"title": "Event ID",
"outbound": true,
"examples": [
"2a3c8c6c-54ee-47d6-97fc-0cbc8e0faf39"
]
},
"traceId": {
"type": "string",
"default": "",
"description": "Distributed tracing identifier that allows correlation of this event with related events and operations across multiple systems and services. Essential for debugging, monitoring, and understanding event flows in microservice architectures.",
"title": "Trace ID",
"outbound": true,
"examples": [
"1234-asdb-1234-cbdc-1234"
]
},
"source": {
"type": "string",
"default": "",
"description": "Identifies the source system or platform that generated this event. Format: '<product>:<environment-identifier>' (e.g., 'sgx:uscluster1'). Used for routing, filtering, and understanding event origin.",
"title": "Source",
"examples": [
"msg:na2"
]
},
"time": {
"type": "string",
"default": "",
"description": "ISO 8601 timestamp indicating when the event occurred. This represents the actual time of the user activity, not when the event was generated or processed. Critical for temporal analysis and event ordering.",
"title": "Title",
"outbound": true,
"examples": [
"2007-04-05T14:32:10.700Z"
]
},
"event": {
"type": "string",
"default": "message_unsubscribe",
"const": "message_unsubscribe",
"description": "Event type identifier for tracking when users unsubscribe from communication lists or channels. Fixed value 'message_unsubscribe'. Used for managing subscription preferences and analyzing user opt-out patterns for communication optimization.",
"title": "Event",
"label": "Message Unsubscribe",
"examples": [
"message_unsubscribe"
]
},
"accountId": {
"type": "string",
"default": 0,
"description": "Platform-specific account identifier (tenant ID) that owns the event and user profile. Used for data segregation, access control, and multi-tenant event routing. Essential for ensuring data privacy and proper event attribution.",
"title": "Account ID",
"examples": [
"2002"
]
},
"class": {
"type": "string",
"default": "default",
"description": "Event classification that indicates the trigger nature of the event. Four recognized values: default, signal, moment, and system. Used for prioritization, routing, and analytics categorization.",
"title": "Event class",
"examples": [
"signal"
]
},
"contextRef": {
"type": ["string","null"],
"default": "",
"description": "Populated by a reference specified by the requester when invoking a service. This reference can be passed as a parameter to an API request to any service. Examples of contextRef can include the product, account and table to update on an integration. For example, if MSG US ask for a feed to sync data, it can specify in the request what will be the contextRef to use to identify events produced for that request. The contextRef, can include, for example <source>:<accountid>:<table_id>:<syncname> ('msg:us:547:entity_100:sync1')",
"title": "Context Ref",
"label": "Context Ref",
"examples": [
"msg:us:547:entity_100:sync1"
]
},
"stream": {
"type": ["string","null"],
"default": "",
"description": "Contains predefined and agreed stream names to identify events for a well known set of data. This will simplify subscribing to that particular set of data.",
"title": "Stream",
"label": "Stream",
"examples": [
"integration:slg",
"integration:msg",
"integration:stu",
"loyalty_profile:slg",
"loyalty_profile:msg",
"loyalty_profile:stu",
"feedback:slg",
"feedback:msg",
"feedback:stu",
"ml:slg",
"ml:msg",
"ml:stu"
]
},
"producedForAccount": {
"type": ["string","null"],
"default": "",
"description": "When an event is published due to a request of a certain account, this attribute contains the account of the requester. For example, bounce events raised from channel services or sync events raised from integration services for a specific integration. This attribute can be considered as an override of the account. When subscribing by account, those events 'produced' for that account will also be dispatched in the subscription.",
"title": "Produced for Account",
"label": "Produced for Account",
"examples": [
"945"
]
},
"producedForSource": {
"type": ["string","null"],
"default": "",
"description": "When an event is published due to a request of a certain source, this attribute contains the source of the requester. For example, bounce events raised from channel services or sync events raised from integration services for a specific integration. This attribute can be considered as an override of the source. When subscribing by source, those events 'produced' for that source will also be dispatched in the subscription.",
"title": "Produced for Source",
"label": "Produced for Source",
"examples": [
"msg:na"
]
},
"data": {
"type": "object",
"default": {},
"description": "Main event payload containing all event details, user profile information, tracking data, and associated metadata. This is the core business data that describes what happened, who was involved, and the context of the event.",
"title": "Data",
"required": [
"unsubType"
],
"allOf": [
{
"if": {
"properties": {
"channel": {
"enum": ["rcs","sms"]
}
}
},
"then":{},
"else": {
"required": ["objectId","objectType","campaignId"]
}
}
],
"properties": {
"accountName": {
"type": ["string", "null"],
"default": "",
"description": "Human-readable name of the account/tenant that owns this event. Used for display purposes and reporting. Corresponds to the accountId field.",
"title": "Account Name",
"examples": [
"CheetahDigital"
]
},
"parentAccountId": {
"type": ["string", "null"],
"default": "",
"description": "Identifier of the parent account in hierarchical account structures. Used for organizational reporting and access control in multi-level tenant configurations.",
"title": "Parent Account ID",
"examples": [
"2001"
]
},
"organizationId": {
"type": ["string", "null"],
"default": "",
"description": "Marigold platform organization identifier. This field is automatically enriched by the Event Stream processing layer to provide organizational context for cross-platform analytics and reporting.",
"title": "Organization ID",
"examples": [
"2000"
]
},
"organizationBu": {
"type": ["string", "null"],
"default": "",
"description": "Business unit identifier within the Marigold organization structure. Automatically enriched by Event Stream processing to enable business unit-level analytics and reporting.",
"title": "Organization BU",
"examples": [
"2002"
]
},
"organizationName": {
"type": ["string", "null"],
"default": "",
"description": "Human-readable organization name within the Marigold platform. Automatically enriched by Event Stream processing for display and reporting purposes.",
"title": "Organization Name",
"examples": [
"Cheetah Digital"
]
},
"objectType": {
"type": "string",
"default": "msg.campaign",
"description": "Fixed value 'msg.campaign'",
"title": "Object Type",
"outbound": true,
"examples": [
"msg.campaign"
]
},
"objectClass": {
"type": ["string", "null"],
"description": "Classification for the object. Provides classification of the object with it the type of object. The classification is not required and it is only informational. It is not used for defining the unique key of the object.",
"title": "Object Class",
"examples": [
"Class S"
]
},
"objectId": {
"type": "string",
"default": "",
"description": "Campaign Run Id",
"title": "Object ID",
"outbound": true,
"examples": [
"104507"
]
},
"objectName": {
"type": ["string", "null"],
"default": "",
"description": "Campaign Name",
"title": "Object Name",
"outbound": true,
"examples": [
"CES Event Samples"
]
},
"objectVersion": {
"type": ["string", "null"],
"default": "",
"description": "Version or revision of the campaign used to generate this event. Enables tracking of campaign iterations and performance analysis across different campaign versions.",
"title": "Object Version",
"examples": [
"CES Event Samples (2023-03-30 21:10:53.9085471) (0870016326)"
]
},
"platformRef": {
"type": ["string", "null"],
"default": "",
"description": "Platform reference. Reference to the service/process producing the event. Used for debugging and tracing. Format example: <prod_acronim>:<env name>:<service-name>:<host-name>",
"title": "Platform Reference",
"outbound": true,
"examples": [
"msg:localenv:serv:d1-server"
]
},
"parentObjectId": {
"type": ["string", "null"],
"default": "",
"description": "Object Id of the parent object",
"title": "Parent Object ID",
"examples": [
"104506"
]
},
"parentObjectName": {
"type": ["string", "null"],
"default": "",
"description": "Name of the parent Object",
"title": "Parent Object Name",
"examples": [
"CES Event Samples Template"
]
},
"sequenceNumber": {
"type": ["integer", "null"],
"default": 0,
"description": "Position in the sequence of eventss, if applicable",
"title": "Sequence Number",
"examples": [
2
]
},
"campaignType": {
"type": ["string", "null"],
"default": "",
"description": "Type or category of the messaging campaign that triggered this unsubscribe action. Indicates whether it's a one-time send, recurring newsletter, automated trigger, drip campaign, etc. Used for campaign performance categorization and unsubscribe rate analysis.",
"title": "Campaign Type",
"outbound": true,
"examples": [
"Regular (one-time)"
]
},
"campaignId": {
"type": "string",
"default": "",
"description": "Unique identifier of the messaging campaign that triggered this unsubscribe action. Links the opt-out decision to specific campaign performance metrics and enables attribution analysis for message content and frequency optimization.",
"title": "Campaign ID",
"outbound": true,
"examples": [
"104507"
]
},
"campaignName": {
"type": ["string", "null"],
"default": "",
"description": "Human-readable name of the messaging campaign that triggered this unsubscribe action. Used for campaign identification and unsubscribe rate performance reporting in analytics dashboards.",
"title": "Campaign Name",
"outbound": true,
"examples": [
"CES Event Samples"
]
},
"campaignVersion": {
"type": ["string", "null"],
"default": "",
"description": "Version or revision of the campaign used to generate this event. Enables tracking of campaign iterations and performance analysis across different campaign versions.",
"title": "Campaign Version",
"examples": [
"CES Event Samples (2023-03-30 21:10:53.9085471) (0870016326)"
]
},
"campaignTemplateId": {
"type": ["string", "null"],
"default": "",
"description": "Template used to create this container instance",
"title": "Campaign Template ID",
"examples": [
"Anniversary Template 2"
]
},
"campaignStepId": {
"type": ["string", "null"],
"default": "",
"description": "Step in a journey or flow",
"title": "Campaign Step ID",
"examples": [
"promotional_step"
]
},
"executionNumber": {
"type": ["integer", "null"],
"default": "",
"description": "Sequential counter tracking the number of times a campaign has been executed. Useful for analyzing campaign performance across multiple runs and understanding iteration effectiveness.",
"title": "Execution Number",
"examples": [
2
]
},
"ip": {
"type": ["string", "null"],
"default": "",
"description": "IP Address",
"title": "IP Address",
"examples": [
"127.0.0.1"
]
},
"audienceId": {
"type": ["string", "null"],
"default": "",
"description": "Audience/Segment/Filter ID",
"title": "Audience ID",
"outbound": true,
"examples": [
"129999"
]
},
"messageId": {
"type": ["string", "null"],
"default": "",
"description": "Unique Message Id",
"title": "Message ID",
"outbound": true,
"examples": [
"129999"
]
},
"testGroup": {
"type": ["string", "null"],
"default": "",
"description": "Campaign variant. Used for A/B testing, variants by language, etc",
"title": "Test Group",
"examples": [
"Control"
]
},
"testVariant": {
"type": ["string", "null"],
"default": "",
"description": "Particular variant inside the test, like the control group or a variant",
"title": "Test Variant",
"examples": [
"TestA"
]
},
"subjectLine": {
"type": ["string", "null"],
"default": "",
"description": "Template subject line",
"title": "Subject Line",
"examples": [
"CES Event Samples - {(CampaignID)}"
]
},
"classification": {
"type": ["string", "null"],
"default": "",
"description": "Campaign Folder",
"title": "Classification",
"examples": [
"My Files/ApiTeam"
]
},
"source": {
"type": ["string", "null"],
"default": "",
"description": "Marketing attribution source indicating how the user arrived at the page (e.g., 'campaign', 'organic', 'referral'). Used for conversion funnel analysis and marketing ROI tracking.",
"title": "Source",
"examples": [
"campaign"
]
},
"medium": {
"type": ["string", "null"],
"default": "",
"description": "Marketing attribution medium specifying the channel type used to reach the user (e.g., 'email', 'cpc', 'sms', 'social'). Complements source data for comprehensive attribution analysis.",
"title": "Medium",
"examples": [
"email"
]
},
"channel": {
"type": ["string", "null"],
"default": "",
"description": "Specific marketing channel or campaign name that brought the user to the flow, e.g. email, sms, push, rts, etc. . Provides granular attribution data for campaign performance analysis.",
"title": "Channel",
"outbound": true,
"examples": [
"email",
"sms",
"push",
"rts"
]
},
"contentId": {
"type": ["string", "null"],
"default": "",
"description": "Content Id, the content/offer user clicked on",
"title": "Content ID",
"examples": [
"123"
]
},
"contentName": {
"type": ["string", "null"],
"default": "",
"description": "Content name",
"title": "Content Name",
"examples": [
"Summer Offer"
]
},
"profileId": {
"type": ["string", "null"],
"default": "",
"description": "Primary internal identifier for the user profile in the platform's customer database. Links this event to the user's complete profile and activity history.",
"title": "Profile ID",
"examples": [
"100.123123"
]
},
"profileAltId": {
"type": "string",
"default": "",
"description": "Alternative Profile Id (email, phone number, appId,...). This is the ID used to identify the person performing the event. The type of the identifier value will be specified in the profileAltType attributte",
"title": "Profile Alt ID",
"outbound": true,
"examples": [
"artemis.entreri@forgottenrealms.com"
]
},
"profileAltType": {
"type": "string",
"default": "",
"description": "Specifies the format and type of the profileAltId value (external, email, phone, deviceId, appId, marketing, program). Essential for proper identifier interpretation and user matching.",
"title": "Type of Profile Alt ID",
"outbound": true,
"enum": ["external","email","phone","deviceId","appId","marketing","program"],
"examples": [
"external",
"email",
"phone",
"deviceId",
"appId",
"marketing",
"program"
]
},
"profileEmail": {
"type": ["string", "null"],
"default": "",
"description": "Email address associated with the user profile. Used for customer communication, identification, and cross-platform user matching. May differ from profileAltId if that uses a different identifier type.",
"title": "Profile Email",
"examples": [
"artemis.entreri@forgottenrealms.com"
]
},
"profileProgramId": {
"type": ["string", "null"],
"default": "",
"description": "Loyalty program member identifier for the user. Links event to loyalty program analytics and enables member-specific analysis and retention strategies.",
"title": "Profile Program ID",
"examples": [
"M-1352",
"S-10002"
]
},
"profilePhone": {
"type": ["string", "null"],
"default": "",
"description": "Phone number associated with the user profile. Used for customer communication and identification. Important for SMS marketing and customer service follow-up.",
"title": "Profile Phone",
"examples": [
"(555) 555-1234"
]
},
"profileAppId": {
"type": ["string", "null"],
"default": "",
"description": "Application-specific identifier for the user within mobile or web applications. Enables app-specific user tracking and cross-session analysis.",
"title": "Profile App ID",
"examples": [
"M-1230002"
]
},
"profileDeviceId": {
"type": ["string", "null"],
"default": "",
"description": "Unique device identifier for the user's device (mobile advertising ID, device fingerprint, etc.). Critical for device-specific analysis and cross-session tracking.",
"title": "Profile Device ID",
"examples": [
"X1230002HSY92JS92"
]
},
"mgId": {
"type": ["string", "null"],
"default": "",
"description": "Marigold platform internal profile identifier used for system integration and cross-platform user identity resolution. Links user across different Marigold services.",
"title": "MG ID",
"examples": [
"MG-00022"
]
},
"profileExternalId": {
"type": ["string", "null"],
"default": "",
"description": "External system profile identifier or alternate key (AK) used for integration with third-party systems. Enables user identity resolution across integrated platforms.",
"title": "Profile External ID",
"examples": [
"artemis.entreri@forgottenrealms.com"
]
},
"profileTimezone": {
"type": ["string", "null"],
"default": "",
"description": "User's timezone setting for proper temporal analysis and personalized communication timing. Critical for understanding user behavior patterns and optimal engagement windows.",
"title": "Profile Timezone",
"examples": [
"etc/utc"
]
},
"profileTier": {
"type": ["string", "null"],
"default": "",
"description": "User's loyalty program tier or membership level at the time of the event. Enables tier-specific analysis and targeted strategies.",
"title": "Profile Tier",
"examples": [
"gold"
]
},
"profileTotalPoints": {
"type": ["integer", "null"],
"default": 0,
"description": "User's total loyalty points balance at the time of the event. Helps analyze behavior patterns based on loyalty engagement level and point accumulation status.",
"title": "Profile Total Points",
"examples": [
7879
]
},
"profileAge": {
"type": ["integer", "null"],
"default": 0,
"description": "Age of the user in years. Enables demographic analysis of behavioral patterns and age-specific insights for targeted marketing strategies.",
"title": "Profile Age",
"examples": [
48
]
},
"profileAgeBand": {
"type": ["string", "null"],
"default": "",
"description": "Age range category derived from the user's age (e.g., '40-49', '18-25'). Simplifies demographic analysis and enables age group-based pattern recognition.",
"title": "Profile Age Band",
"examples": [
"40-49"
]
},
"profileCohort": {
"type": ["string", "null"],
"default": "",
"description": "Cohort classification for the user based on signup date, behavior patterns, or other business-defined criteria. Enables cohort-based analysis of trends over time.",
"title": "Profile Cohort",
"examples": [
"cohort"
]
},
"profileGender": {
"type": ["string", "null"],
"default": "",
"description": "Gender identity of the user for demographic analysis. Enables gender-based behavioral pattern analysis and targeted marketing strategies.",
"title": "Profile Gender",
"examples": [
"female"
]
},
"profileProvider": {
"type": ["string", "null"],
"default": "",
"description": "Email service provider of the user (e.g., 'gmail', 'yahoo', 'outlook'). Useful for email deliverability analysis and communication strategy optimization.",
"title": "Profile Provider",
"examples": [
"gmail"
]
},
"profileIgnore": {
"type": ["boolean", "null"],
"default": false,
"description": "Flag indicating whether this user should be excluded from business reports and analytics (true for internal staff, test accounts, etc.). Ensures data quality in business analysis.",
"title": "Profile Ignore",
"examples": [
false
]
},
"profileJoinDate": {
"type": ["string", "null"],
"default": "",
"description": "ISO 8601 timestamp of when the user first joined or registered. Used for calculating member tenure and analyzing behavioral patterns based on membership duration.",
"title": "Profile Join Date",
"examples": [
"20017-12-16T14:32:10.7Z"
]
},
"profileJoinSource": {
"type": ["string", "null"],
"default": "",
"description": "Marketing source or campaign that originally brought the user to register. Enables long-term attribution analysis and understanding of acquisition channel impact on retention.",
"title": "Profile Join Source",
"examples": [
"exp_campaign_promo1"
]
},
"profileStatus": {
"type": ["string", "null"],
"default": "",
"description": "Current status of the user account (active, inactive, blocked, suspended, etc.). Critical for understanding event context and filtering active user analytics.",
"title": "Profile Status",
"examples": [
"active"
]
},
"profileOptinSms": {
"type": ["boolean", "null"],
"default": false,
"description": "Boolean indicating whether the user has opted in to receive SMS communications. Critical for compliance with communication preferences and targeted follow-up strategies.",
"title": "Profile Opt-in SMS",
"examples": [
true
]
},
"profileOptinMail": {
"type": ["boolean", "null"],
"default": false,
"description": "Boolean indicating whether the user has opted in to receive email communications. Essential for email marketing compliance and determining appropriate follow-up channels.",
"title": "Profile Opt-in Mail",
"examples": [
true
]
},
"profileOptinPush": {
"type": ["boolean", "null"],
"default": false,
"description": "Boolean indicating whether the user has opted in to receive push notifications. Important for mobile app engagement and real-time communication strategies.",
"title": "Profile Opt-in Push",
"examples": [
false
]
},
"profileCountry": {
"type": ["string", "null"],
"default": "",
"description": "Country from the user's profile address information. May differ from the detected geographical country if the user is traveling or using VPN.",
"title": "Profile Country",
"examples": [
"US"
]
},
"profileCity": {
"type": ["string", "null"],
"default": "",
"description": "City from the user's profile address information. Used for location-based services and may differ from IP-detected location.",
"title": "Profile City",
"examples": [
"Sunnyvale"
]
},
"profileState": {
"type": ["string", "null"],
"default": "",
"description": "State or province from the user's profile address information. Important for regional analysis and compliance with local regulations.",
"title": "Profile State",
"examples": [
"CA"
]
},
"profilePostalCode": {
"type": ["string", "null"],
"default": "",
"description": "Postal or ZIP code from the user's profile address information. Enables local area analysis and location-based service optimization.",
"title": "Profile Postal code",
"examples": [
"94089"
]
},
"profileFirstName": {
"type": ["string", "null"],
"default": "",
"description": "First name of the user for personalization and customer service purposes. Enables personalized communication and proper customer identification.",
"title": "Member First name",
"examples": [
"John"
]
},
"profileLastName": {
"type": ["string", "null"],
"default": "",
"description": "Last name of the user for personalization and customer service purposes. Complements first name for complete user identification.",
"title": "Member Last name",
"examples": [
"Doe"
]
},
"profileSegments": {
"type": ["array", "null"],
"default": [],
"description": "Array of audience segments that the user belongs to at the time of the event. Each segment contains ID and name for detailed behavioral analysis and targeted strategies.",
"title": "Profile Segments",
"items": {
"type": ["object", "null"],
"description": "Individual segment object containing segment ID and name for identifying specific audience groups the user belongs to.",
"patternProperties": {
"[a-zA-Z]": { "type": ["string", "null"] }
},
"properties": {},
"required": [],
"examples": [
{"id":"123","name":"fashionista"},
{"id":"456","name":"high_value"},
{"id":"789","name":"dormant"}
]
}
},
"profileAttributes": {
"type": ["object", "null"],
"patternProperties": {
"[a-zA-Z]": { "type": ["string", "null"] }
},
"default": {},
"description": "Flexible key-value store for custom user profile attributes that extend beyond standard fields. Enables business-specific user data while maintaining schema consistency.",
"title": "Profile Attributes",
"required": [],
"properties": {},
"examples": [{}]
},
"unsubType": {
"type": "string",
"default": "",
"description": "Type of unsubscribe, e.g. unsub-form, sms, etc.",
"title": "Type of unsubscribe",
"examples": [
"unsub-form"
]
},
"eventAttributes": {
"type": ["object", "null"],
"patternProperties": {
"[a-zA-Z]": { "type": ["string", "null"] }
},
"default": {},
"description": "Flexible key-value store for custom event-specific attributes that don't fit into standard fields. Enables extensibility for specific business requirements while maintaining schema consistency.",
"title": "Event Attributes",
"required": [],
"properties": {
"senderProfileId": {
"type": "string"
},
"senderProfileName": {
"type": "string"
},
"senderProfileClassification": {
"type": "string"
},
"sendTime": {
"type": "string",
"format": "date-time"
}
},
"examples": [{
"senderProfileId": "77237",
"senderProfileName": "Sender Profile",
"senderProfileClassification": "Transactional",
"sendTime": "2007-04-05T14:32:10.700Z"
}]
},
"isTest": {
"type": ["boolean", "null"],
"default": false,
"description": "Boolean flag indicating whether this is a test event that should be excluded from production analytics and reporting. When true, consumers should filter out this event from business metrics.",
"title": "Is Test",
"examples": [
false,
true
]
},
"eventReason": {
"type": ["string", "null"],
"default": "",
"description": "Reason/cause/trigger of this event",
"title": "Event Reason",
"outbound": true,
"examples": [
"unsubscribed from message service"
]
},
"categories": {
"type": ["array", "null"],
"default": [],
"description": "Array of business categories or tags associated with the event (e.g., 'high_value', 'premium_customer', 'flash_sale'). Enables categorized analysis and targeted strategies.",
"title": "Categories",
"items": {
"type": ["string", "null"],
"description": "Individual category string that classifies this event for business analysis and reporting purposes.",
"examples": [
"Quarter2",
"high_value",
"watchlist"
]
}
}
}
}
},
"examples": [{
"specversion": "1.0",
"type": "event.campaignactivity",
"dataschema": "evt:campaign/v1",
"id": "2a3c8c6c-54ee-47d6-97fc-0cbc8e0faf39",
"traceId": "1234-asdb-1234-cbdc-1234",
"source": "msg:na2",
"time": "2007-04-05T14:32:10.700Z",
"event": "message_unsubscribe",
"accountId": "2002",
"contextRef": "msg:us:547:entity_100:sync1",
"stream": "feedback:slg",
"producedForAccount": "945",
"producedForSource": "msg:na",
"class": "signal",
"data": {
"accountName": "NorthFace",
"parentAccountId": "2001",
"organizationId": "2000",
"organizationBu": "2002",
"organizationName": "Cheetah Digital",
"objectType": "msg.campaign",
"objectClass": "Class S",
"objectId": "104507",
"objectName": "CES Event Samples",
"objectVersion": "CES Event Samples (2023-03-30 21:10:53.9085471) (0870016326)",
"platformRef": "msg:localenv:serv:d1-server",
"parentObjectId": "104506",
"parentObjectName": "CES Event Samples Template",
"sequenceNumber": 2,
"campaignType": "Regular (one-time)",
"campaignId": "104507",
"campaignName": "CES Event Samples",
"campaignVersion": "CES Event Samples (2023-03-30 21:10:53.9085471) (0870016326)",
"campaignTemplateId": "Anniversary Template 2",
"campaignStepId": "promotional_step",
"executionNumber": 2,
"ip": "127.0.0.1",
"audienceId": "129999",
"messageId": "129999",
"testGroup": "Control",
"testVariant": "TestA",
"actorGroup": "human",
"isMachine": false,
"subjectLine": "CES Event Smaples - {(CampaignID)}",
"classification": "My Files/ApiTeam",
"source": "campaign",
"medium": "email",
"channel": "sms",
"profileId": "100.123123",
"profileAltId": "artemis.entreri@forgottenrealms.com",
"profileAltType": "email",
"profileEmail": "artemis.entreri@forgottenrealms.com",
"profileProgramId": "FR-10002",
"profilePhone": "(555) 555-1234",
"profileAppId": "M-1230002",
"profileDeviceId": "X1230002HSY92JS92",
"mgId": "MG-00022",
"profileExternalId": "artemis.entreri@forgottenrealms.com",
"profileTimezone": "etc/utc",
"profileTier": "gold",
"profileTotalPoints": 7879,
"profileAge": 48,
"profileAgeBand": "40-49",
"profileCohort": "cohort",
"profileGender": "female",
"profileProvider": "gmail",
"profileIgnore": false,
"profileJoinDate": "20017-12-16T14:32:10.7Z",
"profileJoinSource": "exp_campaign_promo1",
"profileStatus": "active",
"profileOptinSms": true,
"profileOptinMail": true,
"profileOptinPush": false,
"profileCountry": "US",
"profileCity": "Sunnyvale",
"profileState": "CA",
"profilePostalCode": "94089",
"profileFirstName": "John",
"profileLastName": "Doe",
"profileSegments": [
{"id":"123","name":"fashionista"},
{"id":"456","name":"high_value"},
{"id":"789","name":"dormant"}
],
"profileAttributes": {},
"unsubType": "unsub-form",
"isTest": false,
"eventReason": "unsubscribed from message service",
"categories": ["Quarter2", "high_value", "watchlist"],
"eventAttributes": {
"senderProfileId": "77237",
"senderProfileName": "Sender Profile",
"senderProfileClassification": "Transactional",
"sendTime": "2007-04-05T14:32:10.700Z"
}
}
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment