0

Convert the subscriber information in data extension (Marketing Cloud) into JSON message and send it to external system - Can this be done using AMPScript or Do I need to rely on SSJS (Server Side Java Script). Any thoughts please about the approach? This is the script I've used so far to make a call. Please correct me if I'm wrong.

     %%[var @payload, @response
        set @payload = '{
        "email":"[email protected]",
        "name":"Nishanth M",
        "ref":"1234"
        }'


     set @request = HTTPPost("https://www.trustpilot.com/evaluate-bgl/ABC.com?p=@payload")

    ]%%
     status code: %%=v(@request)=%%
<br><br>response: %%=v(@response)=%%    

       </span></span>

1 Answer 1

0

You will need to make use of the Concat apmscript function for string concatenation which includes mixing strings and variables. In general it is easier to use SSJS for this type of thing, but will depend on your context/use case and knowledge. It's personal preference, but Ampscript is ok for simple uses such as the one you are describing.

You must log in to answer this question.

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