- 13 May 2024
- 4 Minutes to read
- Contributors
- Print
- DarkLight
Customer Actions
- Updated on 13 May 2024
- 4 Minutes to read
- Contributors
- Print
- DarkLight
This section describes how to provide Customer Action data to Wasabi.
Customer Actions Import Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"eventType": {
"type": "string"
},
"eventAction": {
"type": "string",
"enum": [
"CREATED",
"UPDATED",
]
},
"version": {
"type": "number"
},
"body": {
"type": "object",
"properties": {
"interactionId": {
"type": "string"
},
"customerId": {
"type": "string"
},
"interaction": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"SIGN_UP",
"SUBSCRIPTION_RESTARTED",
"SUBSCRIPTION_CANCELLED",
"PROMOTION_APPLIED"
]
},
"subscriptionContractId": {
"type": "string",
"optional": true
}
},
"required": [
"type"
]
},
"utmParameters": {
"type": "object",
"properties": {
"utmSource": {
"type": "string",
"optional": true
},
"utmMedium": {
"type": "string",
"optional": true
},
"utmCampaign": {
"type": "string",
"optional": true
},
"utmContent": {
"type": "string",
"optional": true
},
"utmTerms": {
"type": "string",
"optional": true
}
},
"optional": true
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"interactionId",
"customerId",
"interaction",
"createdAt",
"updatedAt"
]
}
},
"required": [
"eventType",
"eventAction",
"version",
"body"
]
}
Field Descriptions
eventType: Specifies the nature of the event. For this schema, the event type is indicated as CUSTOMER_ACTION, highlighting the customer's specific action or behavior.
eventAction: Indicates the specific action taken with regard to the customer action, with possible options being CREATED or UPDATED. This field tracks the lifecycle stage of the customer action.
version: Denotes the schema version in use, facilitating tracking of updates or changes. Current schema version: 1.0.
body: Acts as a container for the detailed event data, encapsulating all relevant information about the customer interaction.
interactionId: A unique identifier for the interaction, ensuring each customer action is distinctly tracked and referenced.
customerId: The unique identifier of the customer involved in the interaction, linking the action directly to the customer's profile.
interaction: An object that thoroughly describes the nature of the customer's interaction, detailed as follows:
type: Specifies the type of interaction, with options including SIGN_UP, SUBSCRIPTION_RESTARTED, SUBSCRIPTION_CANCELLED, PROMOTION_APPLIED. This field categorises the customer action for targeted analysis and response.
subscriptionContractId [optional]: Identifier for the subscription contract affected by the interaction. This field is optional and relevant only for actions directly impacting subscription contracts.
utmParameters [optional]: An object containing UTM parameters for tracking the marketing sources that led to the customer's action. This object is optional and includes:
utmSource [optional]: Identifies the source of the traffic, such as a search engine or newsletter, aiding in the attribution of marketing efforts.
utmMedium [optional]: Specifies the medium of the marketing campaign, e.g., email or CPC (cost per click), providing insights into the effectiveness of various marketing channels.
utmCampaign [optional]: The name of the specific marketing campaign, facilitating detailed tracking and analysis of marketing strategies.
utmContent [optional]: Utilised to differentiate similar content or links within the same advertisement or campaign, enhancing content-specific analysis.
utmTerms [optional]: Represents the search terms associated with the campaign, especially useful for analysing the relevance and performance of keyword-targeted content.
createdAt: Timestamp indicating when the event was initially created, providing a precise record of the event's origination, formatted as date-time, in ISO 8601 format.
updatedAt: Timestamp marking the most recent update to the event, reflecting any changes or developments in the customer action or interaction data, formatted as date-time, in ISO 8601 format.
Example
{
"eventType": "CUSTOMER_ACTION",
"eventAction": "CREATED",
"version": 1.0,
"body": {
"interactionId": "123456789",
"customerId": "123456789",
"interaction": {
"type": "SIGN_UP",
"subscriptionContractId": "12345678"
},
"utmParameters": {
"utmSource": "123456789",
"utmMedium": "youtube",
"utmCampaign": "spring_sale",
"utmContent": "banner_ad",
"utmTerms": "cats+kitten+food"
},
"createdAt": "2024-02-06T10:00:00",
"updatedAt": "2024-02-06T12:45:00"
}
}