How to send email to the recipients of the previous delivery in a trigger workflow | Community
Skip to main content
Level 3
August 1, 2019
Solved

How to send email to the recipients of the previous delivery in a trigger workflow

  • August 1, 2019
  • 12 replies
  • 7593 views

Hi,

I'd like to create a automate trigger that send out three series of emails to the same recipients. For instance. First email A send out today to 100 recipients. 7 days later, send email B with different content to the same recipients as the first email, then 7 days later, send email C to the same recipients of the second delivery. I am having difficulty to find a way to query the recipients of the previous delivery in the automated trigger. If anyone has built the similar workflow, can you please share.

Thanks,

Jason

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

Hi,

Query nms:recipient, filtering on nms:broadLogRcp. For second email, this would be 'recipient exists in broadlog where delivery=first delivery and status=sent'.

Thanks,

-Jon

12 replies

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
August 1, 2019

Hi,

Query nms:recipient, filtering on nms:broadLogRcp. For second email, this would be 'recipient exists in broadlog where delivery=first delivery and status=sent'.

Thanks,

-Jon

Level 3
August 1, 2019

Thanks Jon. This works.  I will also need to add delivery create date = 7 days ago which is the date the first email sent. 

Do you know what's the difference between delivery create date and event date under nms:broadLogRcp?

Thanks,

Jason

Jonathon_wodnicki
Community Advisor
Community Advisor
August 1, 2019

Should be same. Use event date.

Level 3
August 1, 2019

Great. Thanks for your help, Jon.  Much appreciated.

Jason

Jonathon_wodnicki
Community Advisor
Community Advisor
August 1, 2019

Forgot to mention, if this is automated the delivery should also do an inverse filter on itself- where recipient doesn‘t exist in broadlog for this delivery. Otherwise recipients will be spammed until the workflow stops.

Level 3
August 1, 2019

Hi Jon,

I am not quite sure about doing an inverse filter on itself for this delivery. Can you please take a look the query below and see what need to be changed?

Thanks,

Jason

Jonathon_wodnicki
Community Advisor
Community Advisor
August 1, 2019

It’s the same, and’ed to this query, though with ‘not exists’ instead of ‘exists’ and with the second delivery instead of the first. You don’t need to do it here if the workflow runs on a daily cadence, since it’s implied by the 7 day check on first delivery. Might come up later on a variant though.

Jonathon_wodnicki
Community Advisor
Community Advisor
August 1, 2019

*Filtering dimension has to be nms:recipient to do this.

Level 3
August 1, 2019

I see.  Are you trying to do this all in one workflow?  Will it be easier to have one workflow for each deployment.

1st workflow will be used for 1st email sent to the new recipients who just joined. 2nd workflow will be used to send the 2nd email 7 days after the 1st email. 3rd workflow will be used to send the 3rd email 7 days after the 2nd email is sent?

Thanks,

Jason

Jonathon_wodnicki
Community Advisor
Community Advisor
August 1, 2019

Yes 1 workflow per delivery is clearest.