How to reuse the data from the original message that has triggered an event flow? You can do that by following these instructions. But first of all make sure that you enable the archive flowstep at the original message flow. Otherwise you will not be able to fetch the data from the original message.
Setting up the JSON Data template
First you have to create a JSON Data template under Design -> Templates. Make sure to select JSON as your template type. Over here you will have place the following code:
<#if event??>
<#assign archive = fetchMessageArchive(event.message.id) />
</#if>
${toJson(.main)}
Press save and go to your original message flow that you want to trigger the event flow.
In the event Flow you will have to place this template before you place a submit new message flowstep, in order to successfully implement this flowstep.
Setting up the “submit new message” flowstep
It is important that you create a new flow with a flowselector. Also remember the Source you have applied to this follow-up flow as that will be important when setting up the Event Flow. When setting up, feel free to apply any flowstep you desire to your flow. Now save the settings and go back to your event flow.
When you are back in the Event Flow, you can now select and setup the submit new message flowstep. At first when you open this flowstep it will appear empty. You need to click on advanced and select the same source as the follow up message flow.
Once you have selected the right source. Go back to the main tab, fold open the list of flowselectors and select the flow you would like to trigger.
Click on OK and save your Event Flow.
Using the data in a follow up message flow
If a message status or recipients behavior matches the conditions of the event flow, it will now trigger the selected message flow. In order to use the archived data you will need to add the following to your variables: “archive[0].data”.
Now you are able to use the data from the original message in a follow up message flow by using ${archive[0].data.variableName} in your template. This can be used in different kind of scenario's where you need to use the data.
Good luck!