4

I'm working on my first Custom Activity for JourneyBuilder (Platform v1), and I'm having trouble getting the system to call my Execute URL when a Contact flows through my Custom Activity.

I’ve been successful in setting up an Interaction triggered by a Data Extension and I can get a Contact to flow through it. I have it set up so that my Custom Action is the first thing that occurs and is followed by an Update Contact Data action that changes some value on my Data Extension.

When I send a contact through the Journey I never receive any traffic to my “Execute” URL, I don’t receive any errors and my Update Contact Data action occurs as expected.

Like with the save/validate/publish issue I had earlier, I’ve tried every combination of values and settings that I can think of in my config.json. My last attempts pretty much mirror the settings published in the Custom Action documentation (http://code.exacttarget.com/app-development/journey-builder-development/platform/creating-platform-activities.html). All attempts have proven unsuccessful.

Currently my config.json looks like this:

{
    ...
    "arguments": {
        "execute": {
            "inArguments": {

            },
            "outArguments": {

            },
            "url": "https://mydomain.com/api/journeybuilder/v1/notify",
            "verb": "POST",
            "body": "",
            "header": "",
            "format": "json",
            "useJwt": false,
            "timeout": 10000
        }
    },
    ...
}

I’m hoping there is something obvious that I’m just missing. Has anyone been successful in creating a Custom Activity (on the V1 Platform) that can call out to the Execute URL?

4 Answers 4

1

Here is a valid config.json example for a Custom Activity:

json { "workflowApiVersion": "1.0", "metaData": { "icon": "images/sms.png", "iconSmall": "images/smsSmall.png", "category": "message", "version": "2.0" },
"type": "MOBILE", "lang": { "en-US": { "name": "Mobile (Workflow API)", "description": "A mobile activity that does things and stuff with your phone." }
},
"arguments": { "execute": { "inArguments": { "something": "coming from config.json" },
"outArguments": [], "uri": "URI/for/your/activity/execute", "verb": "POST", "body": "", "header": "", "format": "json", "useJwt": false, "timeout": 10000 }
},
"configurationArguments": { "applicationExtensionKey": "mobile-workflow", "save": { "uri": "URI/for/your/activity/save", "body": "", "verb": "POST", "useJwt": false },
"publish": { "uri": "URI/for/your/activity/publish", "verb": "POST", "body": "", "useJwt": false },
"validate": { "uri": "URI/for/your/activity/validate", "verb": "POST", "body": "", "useJwt": false }
},
"edit": { "uri": "", "height": 200, "width": 300 }
}

1
  • Can you expand upon your example around the inArguments with a concrete example? is it: "inArguments" = { "ContactID": "{{Contact.Id}}" },
    – Andy Rowse
    Commented Oct 14, 2014 at 4:07
0

I'm going to answer my own question again. After a ton of trial and error I found that the "outArguments" and "inArguments" properties do not work. If they are present, regardless of value (empty, json, etc), the system will not send requests to your Execute URL.

Using this configuration worked for me.

{
    ...
    "arguments": {
        "execute": {
            "url": "https://mydomain.com/api/journeybuilder/v1/notify",
            "verb": "POST",
            "body": "",
            "header": "",
            "format": "json",
            "useJwt": false,
            "timeout": 10000
        }
    },
    ...
}

Hopefully this is a bug in JourneyBuilder. The inArguments are used to supply data bound values to the Custom Activity (according to their docs... which are obviously inaccurate).

0

Actually, the inArguments and outArguments do work but only if you provide them valid Data-Binding syntax (which must be valid JSON object with double-quote-wrapped keys).

If you aren't using them, you have to set them to an "empty array" []

That's kinda confusing and I'll create a bug in Journey Builder for it. Thanks.

2
  • Here is a valid config.json example for a Custom Activity: Commented Oct 11, 2014 at 2:58
  • Can you combine and delete an answer? Commented Oct 11, 2014 at 23:49
0

Here is a valid, up-to-date, example of custom activities that use inArguments and outArguments, binding to the contact model and also passing data from one activity to another.

When I send a contact through the Journey I never receive any traffic to my “Execute” URL, I don’t receive any errors and my Update Contact Data action occurs as expected.

If your 'execute' route isn't being called it may be because the URL endpoint in your config.json file is invalid (speaking from experience, unfortunately). Copy it and paste it into a browser and see what happens.

You must log in to answer this question.

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