CAPTURE INTERACTIONS DATA LEVERAGING SEND LOGGING
STEP BY STEP GUIDE HOW TO ENABLE INTERACTIONS IN SALESFORCE MARKETING CLOUD LEVERAGING SEND LOGGING
STEP 1 : SEND LOG ENABLEMENT
Enablement of send logging step by step guide can be found here
STEP 2 : CREATE DATA EXTENSION FOR INTERACTION LOG
Primary keys : JobId, ListId, BatchId, Eventdate ,Subscriberkey and InteractionEvent

STEP 3 : BUILD AUTOMATION FOR INTERACTION LOGGING

STEP 4 : BUILD QUERY ACTIVITIES FOR INTERACTION LOGGING
======================================================================
======================================================================
Select
JobID
,ListID
,BatchID
,SubID
,SubscriberKey
,EventDate
,ViewLink
,EmailId
,EmailName
,memberid
,'Sent' as InteractionEvent
,GetDate() as ModifiedDate
From
SendLog
Where DATEDIFF(hh, EventDate,GetDate())=24
======================================================================
======================================================================
Select
s.JobID
,s.ListID
,s.BatchID
,s.SubID
,s.SubscriberKey
,o.EventDate
,s.ViewLink
,s.EmailId
,s.EmailName
,s.memberid
,'Opened' as InteractionEvent
,GetDate() as ModifiedDate
From
SendLog s
inner join (
Select
JobID
,ListID
,BatchID
,SubscriberID as SubID
,SubscriberKey
,EventDate
From _Open
Where DATEDIFF(hh, EventDate,GetDate())=24
) o
on
o.JobID = s.JobID
and o.ListID = s.ListID
and o.BatchID = s.BatchID
and o.SubscriberKey = s.SubscriberKey
======================================================================
======================================================================
Select
s.JobID
,s.ListID
,s.BatchID
,s.SubID
,s.SubscriberKey
,c.EventDate
,s.ViewLink
,s.EmailId
,s.EmailName
,s.memberid
,'Clicked' as InteractionEvent
,GetDate() as ModifiedDate
From
SendLog s
inner join (
Select
JobID
,ListID
,BatchID
,SubscriberID as SubID
,SubscriberKey
,EventDate
From _Click
Where DATEDIFF(hh, EventDate,GetDate())=24
) c
on
c.JobID = s.JobID
and c.ListID = s.ListID
and c.BatchID = s.BatchID
and c.SubscriberKey = s.SubscriberKey
======================================================================
- Query Activity for Bounce
======================================================================
Select
s.JobID
,s.ListID
,s.BatchID
,s.SubID
,s.SubscriberKey
,b.EventDate
,s.ViewLink
,s.EmailId
,s.EmailName
,s.memberid
,'Bounced' as InteractionEvent
,GetDate() as ModifiedDate
From
SendLog s
inner join (
Select
JobID
,ListID
,BatchID
,SubscriberID as SubID
,SubscriberKey
,EventDate
From _Bounce
Where DATEDIFF(hh, EventDate,GetDate())=24
) b
on
b.JobID = s.JobID
and b.ListID = s.ListID
and b.BatchID = s.BatchID
and b.SubscriberKey = s.SubscriberKey
======================================================================
- Query Activity for Unsubscribe
======================================================================
Select
s.JobID
,s.ListID
,s.BatchID
,s.SubID
,s.SubscriberKey
,u.EventDate
,s.ViewLink
,s.EmailId
,s.EmailName
,s.memberid
,'Unsubscribed' as InteractionEvent
,GetDate() as ModifiedDate
From
SendLog s
inner join (
Select
JobID
,ListID
,BatchID
,SubscriberID as SubID
,SubscriberKey
,EventDate
From _Unsubscribe
Where DATEDIFF(hh, EventDate,GetDate())=24
) u
on
u.JobID = s.JobID
and u.ListID = s.ListID
and u.BatchID = s.BatchID
and u.SubscriberKey = s.SubscriberKey
References :
Comments
Post a Comment