Expand my Community achievements bar.

Journey start only after receiving 2 events from 2 different streaming data sources

Avatar

Level 1

Hi all,

 

I have a requirement where I want to start the journey after the user has performed a transaction and an additional event from Pega has been received.
The flow of events is such that a transaction will be made by the user at a store, that event will be received via the transaction events dataset (experience event). When the transaction event will occur, there will be another event received soon after it (sometimes it may be received earlier in AEP) containing some offer details.

 

I want to utilise context data from both event calls and use the context data within the message/email.


E.g. user went to the store and made a purchase of $X in the store ABC. This transaction is sent to AEP in real time.
Because of user's this activity, Pega created an offer and sent it to AEP in real time as well.
The catch is sometimes the Pega offer can come earlier and sometimes the transaction event can come earlier.

I want the user to only enter the journey when both the events have been received in AEP.

Then, I want to use the context data from both the events in the message, like this:

Hey $firstName,


Because you made a purchase of $X on store ABC, you are eligible for the offer123.

What approach should I follow to achieve this use case?
Should I start the journey on audience qualification? I believe I won't be able to use the context data in the message in that case.

 

Thanks

6 Replies

Avatar

Community Advisor

Hi @Varun_Kalra1   I think we should try to create a custom event to capture the combined context of both the transaction and offer events. This event can include fields like transactionId, offerId, purchaseAmount, storeName, and any other relevant details.

Once we have the events we can
configure the AJO journey to start on this custom event. This ensures that the journey only triggers after both events have been received and the custom event has been created

 

 

Within the journey, use custom events to start the journey access the context data from the custom event, and use it to personalize the message. You can use expressions like $context.transactionId, $context.offerId, etc., to reference the desired fields.



Hi Pradeep,

 

Both of the events will be coming from different data sources and will have different schemas.

While configuring an event, I can only select one schema.

If I create 2 separate events, I will not be able use them to trigger a journey, as any one of the two events may hit AEP first.

How can I create a custom event to: "capture the combined context of both the transaction and offer events"?

 

Thanks

Avatar

Level 3

Create an audience(edge/streaming) with both events after a certain timeline and qualify to the audience. Start your journey with audience qualification.

Avatar

Level 1

The issue is how can I use the context data from the event data payload if I use the audience qualification to start the journey?

Avatar

Employee

You can use one of the events to start the journey, wait for x minutes / hours before the other event arrives and then access the relevant attributes from the second event using collection management functions https://experienceleague.adobe.com/en/docs/journey-optimizer/using/orchestrate-journeys/building-adv... to write the relevant event attributes back to a dataset which can be used as a trigger for the actual journey.

Avatar

Community Advisor

Hi @Varun_Kalra1 

 

Yes, you can use multiple events in the same journey.

 

only limitation is they need to have the same namespace (e.g email, ECID, crmid, etc)

 

there is an option called timeout 

 

find more details

https://experienceleague.adobe.com/en/docs/journey-optimizer/using/orchestrate-journeys/about-journe...

 

Thanks,

David



David Kangni