Expand my Community achievements bar.

SOLVED

Aim to recipients with a reminder email

Avatar

Level 2

Here is my question: I am going to make a campaign with 2 workflows.

 

1) In the first time I send a welcome email to a recipient and I will enter a segment code=1, then after 7 days they will re-enter the workflow (doing a split by segment code=1) and I will send them new this email but I will insert a segment code=7 to note that it is a reminder.

2) In the second workflow I want to pick up this recipient with segment code=7 and I want to send him a final email.

 

I have seen in some instances that only a simple javascript is needed at workflow level, but i cant remember it...

 

Would you know how to do it?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@Javi_Landa , temp schema will get deleted once the workflow goes to finished state if the operator disable 'keep the interim result' in workflow property. (as well, Asking operator to enable 'keep the interim result' won't be a best practice, as this option makes huge disk space risk in database).

And Each time the workflow runs, workflow's temp schema holds only the last run data in it. So the only way is you need to store the segment code along with recipient schema either in broad log schema or the solution-2 by adding a delivery code.

In you follow the solution-2, you can query as segmentCode = wkf_1_seg7 and event date = 7 days ago.

View solution in original post

5 Replies

Avatar

Community Advisor

Hello @Javi_Landa 

 

Are you looking for postevent function to trigger another workflow?

 

The code is 

xtk.workflow.PostEvent("workflow2", "signal", "", <variables var1={myVar1}/>, false);

     Manoj
     Find me on LinkedIn

Avatar

Level 2

Hi! not really, i just want to "rescue" the segment code i created in workflow 1 and use in segmentation in workflow 2 (as far as i remember, as part of the temporary schema).

Avatar

Community Advisor

Hi @Javi_Landa ,

For this, you need to store the segment code in broad log schema.

Step-1:

In your broad log schema, create an attribute @segmentCode with data type as string.

Step-2:

Update database structure > disconnect - reconnect

Step-3:

Then, in your target mapping, storage tab > Additional fields, add as below

Source expression: [targetData/@segmentCode]

Destination: @segmentCode

ParthaSarathy_0-1688393635720.png

So now in broadLog schema, you can able to see which recipients got targeted using which segment and belongs to which delivery

 

ParthaSarathy_0-1688394227513.png

ParthaSarathy_1-1688394346695.png

And in Workflow-2, you can do a query like,

Targeting dimension: Recipient

Filtering dimension: Recipient Delivery Logs (BroadLogRcp)

ParthaSarathy_0-1699874343683.png

This Query will result out all recipients who had received segmentCode=7 email from Workflow1

 

Solution-2:

If you don't want to create separate attribute in broadLogRcp schema, then in your workflow-1 open the delivery of segmentCode=7 and in delivery property provide delivery code (example, Delivery code: wkf1_segmentCode_7)

ParthaSarathy_1-1699874579550.png

 

Now, in your workflow-2, Query as below to fetch all the recipients who received workflow-1's segmentCode=7 delivery.

Targeting dimension: Recipient

Filtering dimension: Recipient Delivery Logs (BroadLogRcp)

[delivery/@deliveryCode] equals to wkf1_segmentCode_7

ParthaSarathy_2-1699874738373.png

Avatar

Level 2

Thank you for your information! It is helpful.

 

I thought another way to solve it but i have not the tech knowledge. Maybe you can help me here.

 

My idea is to obtain in a query the internal name of the campaign (i think i need js to do it),get the event date and the segment code that is saved in the temp schema (i think i need js here as well).

 

With this hints, do you think it is possible to do it like this?

 

My big fear is to contact a customer more times so his segment code will be changed... Or the segment code is saved for each comunication?

Avatar

Correct answer by
Community Advisor

@Javi_Landa , temp schema will get deleted once the workflow goes to finished state if the operator disable 'keep the interim result' in workflow property. (as well, Asking operator to enable 'keep the interim result' won't be a best practice, as this option makes huge disk space risk in database).

And Each time the workflow runs, workflow's temp schema holds only the last run data in it. So the only way is you need to store the segment code along with recipient schema either in broad log schema or the solution-2 by adding a delivery code.

In you follow the solution-2, you can query as segmentCode = wkf_1_seg7 and event date = 7 days ago.