2

I would like to know where I can find any documentation about how to configure the "config.json" file in order to create a Custom Split Activity as shown here.

I have also found information saying that I should not use "Flow Control" "Custom Activities" but seems pretty old. Is this information still valid?

And one more question, can I create Custom Activities with more than 2 outputs?

Thanks!

2

I've documented the properties used in the config.json in this table with property names expressed in dot notation where appropriate. (it turns out that StackExchange does not support Markdown tables so I've had to push this to my repo).

Regarding your question on setting the Activity category in App Center, you can choose from:

  • Data Updates
  • Flow Control
  • Messaging

If you don't assign a category in App Center, the Custom Activity will be listed under a 'Custom' heading in the Activities list within the Interaction Canvas.

The structure of a config.json file is provided below.

{
   "workflowApiVersion":"1.0",
   "metaData":{
      "version":"2.0",
      "icon":"images/activity-icon.png",
      "iconSmall":"images/activity-icon-small.png"
   },
   "type":"REST",
   "outcomes":[
      {
         "arguments":{
            "branchResult":"wishlist_item",
            "argument":"passed from config.json for wishlist_item"
         }
      },
      {
         "arguments":{
            "branchResult":"cart_item",
            "argument":"passed from config.json for cart_item"
         }
      },
      {
         "arguments":{
            "branchResult":"purchase_item",
            "argument":"passed from config.json for purchase_item"
         },
         "metaData":{
         "label":"Purchase"
   }
      }
   ],
   "lang":{
      "en-US":{
         "name":"Custom Split",
         "description":"A Custom Split Activity with multiple outcomes",
         "i18n_wishlist":"Wishlist",
         "i18n_cart":"Cart",
         "i18n_purchase":"Purchase"
      }
   },
   "outcomeLabelLanguageMap":{
      "wishlist_item":"i18n_wishlist",
      "cart_item":"i18n_cart",
      "purchase_item":"i18n_purchase"
   },
   "userInterfaces":{
      "runningModal":{
         "url":"runningModal.html"
      },
      "runningHover":{
         "url":"runningHover.html"
      }
   },
   "arguments":{
      "execute":{
         "inArguments":[
            { "firstName":"{{Contact.Attribute.Customers.FirstName}}" },
            { "lastName":"{{Contact.Attribute.Customers.LastName}}" },
            { "emailAddress":"{{Contact.Default.Email}}" }
         ],
         "outArguments":[
            { "caseID":"number" }
         ],
         "url":"https://domain.com/activity-path/execute/",
         "verb":"POST",
         "body":"",
         "header":"",
         "format":"json",
         "useJwt":false,
         "timeout":10000
      }
   },
   "configurationArguments":{
      "applicationExtensionKey":"extension-key-created-in-app-center",
      "defaults":{ "name":"value" },
      "save":{
         "url":"https://domain.com/activity-path/save/",
         "body":"",
         "verb":"POST",
         "useJwt":false
      },
      "publish":{
         "url":"https://domain.com/activity-path/publish/",
         "verb":"POST",
         "body":"",
         "useJwt":false
      },
      "validate":{
         "url":"https://domain.com/activity-path/validate/",
         "verb":"POST",
         "body":"",
         "useJwt":false
      }
   },
   "edit":{
      "url":"https://domain.com/activity-path/",
      "height":400,
      "width":500
   }
}
2
  • Could you add some imformation about what kind I have to response from the Custom Split Decision API in order to select one outcome or another? Mar 23 '15 at 10:42
  • Hello Jose, the Custom Split Activity documenation is provided here. In summary, you will need to include an outcomes object in your config.json file. Each default outcome must contain a branchResult field. Journey Builder will expect the response of the custom activity's Execute REST call to contain an object { branchResult: <value> }, where <value> matches the branchResult of one of the Activity's outcomes. Mar 23 '15 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.