How to use Aliasing Activities

What do I do if my a customer updates their identifier?

Alias activities can be used to handle the case when a customer updates their global identifier.
For example:

  • user may update their email to be their work instead of personal
  • user entered the wrong email in a website form

To solve this problem we use an aliasing activity.
An aliasing activity will update a customer's global identifier to a new global identifier.

How do I create an aliasing activity?

You need to create an activity transformation where the:

  • anonymous_customer_id is the old customer value
  • customer is the new customer value

Then under processing config, advanced configuration, check Process as an Aliasing Activity

Example SQL

SELECT 
    u.id as activity_id 
    
    , u.updated_at as ts
    
    , u.email as customer 
    
    , case when a.customer is not NULL then 'customer' END  as source 
    , a.customer  as source_id 
    
    , 'updated_email' as activity 
    
    , NULL as feature_1 
    , NULL as feature_2
    , NULL as feature_3
    
    , NULL as revenue_impact 
    , NULL as link 

from db.users u
left dw.activity_stream a 
    on (a.activity = 'updated_email' and a.activity_repeated_at is NULL)
 where a.customer is null or a.customer <> u.email




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