0

we are building a Custom Activity within Journey Builder. We've followed the provided documentation but are struggling to complete this.

My understanding is that a Custom Activity is triggered from a Trigger within Journey Builder, that is, either a default Trigger (from within Journey Builder) or a Custom Trigger.

The workflow for a Custom Activity as I understand it is:

  1. User selects Custom Activity in Journey Builder
  2. User configures the Custom Activity through iframe and clicks Save
  3. Custom Activity fires a requestPayload event
  4. Custom Activity listens for a getPayload event from Jouney Builder

Assuming this is correct, I am trying to understand how the getPayload event works.

Remember that the Custom Activity is triggered from a Trigger or Custom Trigger — I would have assumed that the getPayload event would be able to pass the value of the Trigger.

For example, when creating a Trigger, you select a Data Extension then assign a filter, like the example below.

Creating Trigger within Journey Builder

I would have assumed that it's possible to get the filter result passed to the getPayload event, that is the Data Extension and Subscriber Keys that meet the filter criteria defined in the Trigger, however I can't figure out how to do this.

The Custom Activity is obviously going to be dependent on the result of the Trigger, (for example, do something for recipients that meet the Trigger criteria), so I would have thought I can retrieve this data from the Trigger.

Can someone shed some light on this?

1 Answer 1

2

You can use Data-Binding to achieve this. Data-binding allows your custom activity to interact with your data via the context of either the Contact, the Interaction, or the Event

How to Use Data-Binding

In order to use the data from your Trigger, your inArgument would look something like this:

{{Event.my-custom-product-trigger-key.ProductId}}

As for the PostMonger "getPayload" and "requestPayload", there have been some recent updates to how Journey Builder communicates with your app. The updated documentation can be found here:

Using PostMonger with Journey Builder Custom Activities

5
  • Thanks for the information. We've currently implemented Journey Builder integration as a Legacy Custom Activity. Does Data-Binding work with the Legacy API or does it only work with V1 Platform Custom Activities? Commented Sep 9, 2014 at 22:04
  • Yes, data-binding works for Legacy and Platform V1 Journey Builder. Commented Sep 11, 2014 at 19:59
  • To elaborate on Dave's answer. You're seeking the "Event Context" for your data-binding. You use data-binding in the inArguments and outArguments respectively for the Activity. The "Event Context" is available for ALL interaction components which accept in/out args. Make sure to pass it in as a string and as an element to the in/out args array, like this... {..."execute": { "inArguments": [ "{{Event.<custom-trigger-key>.<property-on-event>}}"]}...} Commented Sep 11, 2014 at 20:04
  • Thanks Benjamin, that's good that we can use Data Binding with Legacy Platform. Regarding your snippet {{Event.<custom-trigger-key>.<property-on-event>}} — we don't use a custom trigger, so what can we use instead of custom-trigger-key. It is possible to use Event Definition Key? Commented Sep 12, 2014 at 18:46
  • Yes, you can use your Event Definition Key there as well.
    – Dave Helms
    Commented Sep 19, 2014 at 14:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .