Check delivery day of X email for sending Y email | Community
Skip to main content
Level 4
January 13, 2023
Question

Check delivery day of X email for sending Y email

  • January 13, 2023
  • 3 replies
  • 3379 views

Hi,

 

There are 2 workflows. 1st is for X email (welcome email) and 2nd is for Y email. X email workflow will run daily and Y email workflow will run on Tuesday and Friday only. Recipient shouldn't receive X and Y email on same day. There should be at least 1 day gap between them.

 

I'm trying to check few conditions for the following scenarios.

 

Scenario - 1

 

We have sent X email (welcome email) On Monday

 

Now, Workflow for email (Y) will run on Tuesday and recipient will get Y email as there is a day gap.

 

Scenario-2

 

We have sent X email on Tuesday

 

Now, workflow for Y email will run on Tuesday but recipient should not get Y email as there is no day gap. They should get email on Friday when workflow runs again.

 

So basically, when sending Y email, needs to check whether X email (welcome email) was delivered one or more days ago.

 

I have used the following condition but I am not sure whether condition below is right or not.. Can anyone plz help ?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

LaurentLam
Level 5
January 14, 2023

Hello,
bad practice as condition in your filter:
1- try to avoid "exist such as" condition in a general way... It's better to use a specific filtering dimension:
targeting dimension: recipient
filtering dimension: recipient delivery logs
2- try to avoid at maximum functions on your table attributes: if an index is placed on this attribute, it won't take it into account
In your scenario:
     A- select your target without applying communication pressure in you first query
     B- After your query, use a split activity and search for who you want to exclude:
you should use in your split activity "event date of recipient deliveryLogs - on or after - DateOnly(1 day before)". Note: read carefully step 1 for making difference between targeting dimension and filtering dimension
In the general tab of your split activity, click on "generate complement".
You will have two branchs after the activity: The one you need to exclude for communication pressure (put an "End" activity to it) and the "complement"... This is this one you will want to continue with to send a delivery.
3- quick tip: as this is a daily workflow you're setting, don't forget to use a test activity with "vars.recCount > 0" as condition in order to avoid analyse a delivery with 0 recipient -> electonical pollution on long term

Also, if you need more general pressure rule on your platform, don't forget to check "commercial pressure" as typologie rules that you can create:
Pressure rules | Adobe Campaign
 

vinay16Author
Level 4
January 15, 2023

Thank you so much for reply.

 

Regarding filtering dimension and filtering dimension - I'll keep this in mind.

 

For "event date of recipient delivery logs", shouldn't I use "date only" ? 

 

If I can use "date only" for that, operator will be "greater than or equal to". Can you plz confirm ?

 

Also, I have used vars.recCount > 0 already. Thanks for the tip.

 

vinay16Author
Level 4
January 15, 2023

In addition to above comment, value date only(1 day before) is right ?

 

What I'm trying to do is below:

 

X email will be sent out daily.

 

Y email will be sent out on next Tuesday and Friday only.

 

Scenarios are like:

 

1 If X is sent on Monday, Y should be sent on Tuesday (next day)

2 If X is sent on Tuesday, Y should be sent on Friday (immediate Friday)

3 If X is sent on Wednesday or Thursday, Y should be sent on Friday (immediate Friday)

4 If X is sent on Friday, Y should be sent out on Tuesday (immediate Tuesday)

5 If X is sent on Saturday, Sunday and Monday, Y should be sent out on Tuesday (immediate Tuesday)

 

Hope date only(1 day before) and expression - on or after - will work for this.. Can you plz share your thoughts?

 

Shubham_Goyal__
Level 6
January 16, 2023

Hi @vinay16 ,

 

Yes, your filtering function seems to be correct 🙂
If I understand you currently you are using broadLogRcp table and have used @deliveryCode Y in each of the deliveries then using a Split activity in the workflow you are looking for the "Recipients" who received this 'Y' delivery yesterday (1-day gap or not)  and these recipients you then exclude in your main target of X.

Two suggestions in your above approach:

1. In the column of @eventDate where you check for delivery events 1 day ago under Operator use "On or After" (screenshot) I think the current parameter "greater than or equal to" is wrong. 🙂 

2. Keep using "Date only()" with DaysAgo() as this will help to look for the delivery with deliveryCode 'Y' from 12:00AM of the day date else if use only DaysAgo(1) then it will look for data from the current server time minus 1 day, not from 12:00 AM.

 

Br,

Shubham

 

vinay16Author
Level 4
January 16, 2023

Hi Shubham,

 

Thank you for detailed reply.

 

I have used Date only() because of that reason only.

 

However, I can't see "on or after" operator if I use Date only() function on both sides. I can use "greater than or equal to" only.

 

What I'm trying to do is below:

 

X email will be sent out daily.

 

Y email will be sent out on next Tuesday and Friday only.

 

Scenarios are like:

 

1 If X is sent on Monday, Y should be sent on Tuesday (next day)

2 If X is sent on Tuesday, Y should be sent on Friday (immediate Friday)

3 If X is sent on Wednesday or Thursday, Y should be sent on Friday (immediate Friday)

4 If X is sent on Friday, Y should be sent out on Tuesday (immediate Tuesday)

5 If X is sent on Saturday, Sunday and Monday, Y should be sent out on Tuesday (immediate Tuesday)

 

Hope date only(1 day before) and expression - on or after - will work for this.. Can you plz share your thoughts?

Shubham_Goyal__
Level 6
January 17, 2023

Hi @vinay16 ,

 

For all your 5 scenarios it seems that your communication Y is sent on Tuesday and Friday whereas X is sent daily so yes if you can apply this filter of 1-day gap (DateOnly(DaysAgo(1)) in your Y communication workflow.

 

Now, coming on your operator "On or After" so as the @eventDate column is date&time so it should give you options for the operator such as "On or After" / "Or or Before", etc
Can you confirm what you mean by "if I use Date only() function on both sides", the function just need to be added on the right side under "Value" and the left side is the label which is calculated automatically. 🙂

You can try to delete this expression and add it again in the filtering properties, then you might get the desired operator value.

Br,

Shubham

Manoj_Kumar
Community Advisor
Community Advisor
January 18, 2023

Hello @vinay16 

 

The conditions you have posted in your questions are correct. Instead of DateOnly, use the event date = 1 day before condition.

 

It will cover the one-day gap.

Manoj     Find me on LinkedIn
vinay16Author
Level 4
January 19, 2023

Hi Manoj,

 

Thanks for reply. I know 1 day will be covered. However, there are few other scenarios that I mentioned above. There are 5 scenarios. Can you plz check and help ?

Manoj_Kumar
Community Advisor
Community Advisor
January 19, 2023

Hello @vinay16 

 

Change the date condition to event date - on or after  - 4 days before

And add another split activity to exclude anyone who has already received Y email and all scenarios will be covered.

 

 

 

Manoj     Find me on LinkedIn