Let's assume a contact enters JB x and a mail gets sent to him. The same contact enters in JB y, but I do not want him to receive another email from JB y on the same day that he received an email from JB x.

How could I develop something like this?

1 Answer 1


I would use an Exclusion Script on the email activities in Journey Builder to prevent the send:

DateDiff(iif(RowCount(LookupOrderedRows('_Sent',1,'EventDate desc','SubscriberKey',_subscriberKey))==1,Field(Row(LookupOrderedRows('_Sent',1,'EventDate desc','SubscriberKey',_subscriberKey),1),'EventDate'),'1/1/1990'),SystemDateToLocalDate(Now()),'D')<1

This script will compare the EventDate of the last sent email to the system's date and therefore exclude the subscriber from the current send if the difference is less than one day.

You can refer to Eliot's reponse here.

  • 1
    I wouldn't ever use a jobid in this scenario because you want a script that does work without manual adjustments, therefore any static values are bad. May 23, 2019 at 14:18
  • I agree with you, but in this exact use case, how would you relate the lookup to the two journeys if it's not using the JobID? May 24, 2019 at 7:43
  • 1
    You cannot even do it with JobID (as far as i know). If you have multiple e-mail activities you will have multiple JobIDs. Furthermore new versions of that journey would have different job ids, which you would only find out AFTER a send process has been done. Therefore i wouldn't do that. Maybe there is a way to query the dataview _JourneyActivity and check for 'ActivityName' which would have to be unique over the whole business unit, but thats not very great aswell. Therefore it should be a custom solution you develop, maybe get all sends from last day in a dex and query if the id is in there May 24, 2019 at 10:22
  • Correct, I've edited my response accordinly. May 24, 2019 at 10:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .