0

I simply want to create a custom activity that pings a URL endpoint.

All the activity will do is take a URL that is entered within an input element that lives within the activity iframe and ping it after another activity completes.

I am looking to do something like the below where "executeURL" is a variable that is passed from the input element in the activity iframe.

Code is contained within customActivity.js:

  function save() {
    var endpointURL = $('#endpointURL').val();
    var executeURL = endpointURL + '/journeybuilder/execute';

    
    payload['arguments'].execute.inArguments = [{
        "tokens": authTokens,
        "url": executeURL
    }];

    payload['metaData'].isConfigured = true;

    console.log(payload);
    connection.trigger('updateActivity', payload);
}


});

Also here is some JSON for my arguments in config.json file. I've left "url" as an empty string since I want it to be populated with the variable executeURL from the code above.

    "arguments": {
    "execute": {
       "inArguments":[
            {
            }                                   
        ],
      "outArguments": [],
      "url": "",
       "verb": "POST",
        "body": "",
        "header": "",
        "format": "json",
        "useJwt": true,
        "timeout": 10000
    }
},

Is this an incorrect way to handle this type of activity? Thanks in advance.

Your Answer

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

Browse other questions tagged or ask your own question.