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.

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.

  • Thank you very much Jonas. I will try the approach suggested by you and revert soon with the results. – Keddy Jul 19 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 Jul 22 at 2:19
  • Cool! Then please mark the answer as correct and post your new quesition as a new question. ;) – Jonas Lamberty Jul 22 at 6:40

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.