0

Is there a way by which we can invoke the AMPScript ClaimRow() functionality from an API call ? If not, is there any other equitable or similar functionality which can be invoked by an API call?

Our requirement is to claim/burn coupon codes inside Marketing Cloud and send them to an external application and not to the end-user via email.

1 Answer 1

0

You can build a Landing Page of type code resource (subtype JSON), implement an authentication mechanism and execute the claimRow function using plain AMPScript there + return a Success or error message to the caller as JSON.

Building such a service has been detailed here: http://www.devsutd.com/writing-a-rest-service-using-cloud-pages

All you need to do then is POST your relevant parameters to the code resource's URL. In the Cloud Resource use RequestParameter() function to get the inputs, and run your AMPScript code based on that.

3
  • Thank you very much Jonas. I will try the approach suggested by you and revert soon with the results.
    – Keddy
    Commented Jul 19, 2019 at 0:43
  • Hello Jonas, I am glad to confirm that i was able to implement the AMPScript in the Cloudpage and invoke it as an API using SOAP UI. Thank you once again for that. The next challenge is how to invoke this cloudpage from inside a Journey and exchange parameter/values with it ?
    – Keddy
    Commented Jul 22, 2019 at 2:19
  • Cool! Then please mark the answer as correct and post your new quesition as a new question. ;) Commented Jul 22, 2019 at 6:40

You must log in to answer this question.

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