Narrator Docs

Activity Transformations

What is an activity transformation?

An activity transformation is the SQL query that transforms your source data to define your activity. The activity transformation must meet two requirements:

  • Each record corresponds to a customer completing the activity
  • It follows a defined structure (11 columns) so that it is compatible with, and can be added to, the Activity Stream

Narrator uses the activity transformation to add activities to the Activity Stream. The activity transformation becomes the definition that will be used to define a customer concept (activity) across your company. Once you create a transformation, everyone at your company will be able to use the same shared definition for this activity.


šŸ“˜

How To: Create an Activity Transformation

Watch this step-by-step tutorial to add your first activity transformation



Columns in an Activity Transformation

The SQL query transforms the source data to generate the following 11 columns:

Column

Description

activity_id

Unique ID for the activity record

ts

Timestamp in UTC for when the activity occurred

source

(for identity resolution) Name of the source system that generated the anonymous customer id (source_id) if applicable (ex. 'segment')

source_id

(for identity resolution) The anonymous customer id that is generated by the source system of this activity

customer

Unique identifier for the customer that is used to identify them across all company touchpoints (typically an email address)

activity

Name of the activity (ex. 'completed_order')

feature_1

Activity specific feature 1

feature_2

Activity specific feature 2

feature_3

Activity specific feature 3

revenue_impact

Revenue or cost associated with the activity

link

URL link associated with the activity (ex. link to the Shopify Order)



Examples

Explore the transformation library for examples by data source.



FAQ




Still have questions?


Our data team is here to help! Here are a couple ways to get in touch...

šŸ’¬ Chat us from within Narrator

šŸ’Œ Email us at [email protected]

šŸ—“ Or schedule a 15-min meeting with our data team

Updated 3 months ago


What's Next

Watch this step-by-step tutorial to create your first activity transformation

Create an Activity

Activity Transformations


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.