Hi I have a custom activity where in upon execute it will call a webservice. I'm good up to this point also I'm able to get the response, now the question is

Using the response that I received is it possible to update the row of a certain data extension?

Thank you.

This is a sample of my custom activity, activity.js

exports.execute = function (req, res) { //console.log("execute function!!!");

console.log("EXECUTE HAS BEEN RUN");
JWT(req.body, process.env.JWT_KEY, (err, decoded) => {

    // verification error -> unauthorized request
    if (err) {
        return res.status(401).end();

    if (decoded && decoded.inArguments && decoded.inArguments.length > 0) {[]

    //Use fields in decoded.inarguments to create a request body
    //use node.js to do webservice
    var bodyStringAdvertising = JSON.stringify({
    //Sample body

    var headersAdvertising = {
    //Sample header

    var optionsAdvertising = { 
    method: 'POST',
    headers: headersAdvertising,
    url: '//Sample URL'

    request(optionsAdvertising, function (error, response, body) {
    if (error) throw new Error(error);
    console.log('response body',body);

    //Once I get the response, I'm going to use some of the values to update 
    a row in a Data Extension
    //How Can I do that


    } else {
        console.error('inArguments invalid.');
        return res.status(400).end();


console.log("end execute function!!!");


Thanks for any help.

1 Answer 1


It's possible, you have to use marketing cloud API you can use REST API or SOAP API it depends on you, ie REST API: https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/postDataExtensionRowsetByKey.htm The same applies to SOAP API, you can find many examples in this page.

You must log in to answer this question.

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