I am trying to set up a text through mobile connect where when the customer replies to text with a keyword it gets loaded against a DE in Marketing Cloud.

In the text response template, I have the following Amp script, but it doesn't seem to be working... The text response works, but it does not insert the text into the DE. Do I need to set up an automation as well?


20190801_Mercury_SMS_Test = Data Extension 5 = Row of data extension to insert data Opt_in = label of row in data extension QUOTE = What text I want inserted into the DE

Any help would be greatly appreciated!

Thanks Kendall

1 Answer 1


InsertData will add a new row, whereas UpdateData will update an existing row. UpsertData is the other option, which will update if the row exists and add if it doesn't.

It sounds like you need UpdateData, but not exactly clear given the info provided. It is not possible to provide a number to represent a "Row of data extension to insert data" in the InsertData function. UpdateData's second required parameter is a value to represent the "Number of columns used to build WHERE clause", which will go towards determining which particular row you want to update. Review the documentation links provided and the examples provided to decide which function is appropriate for your needs.

The only other issue I can see is a syntax issue. You need to declare your function within an Ampscript block for your particular context. This starts with %%[ and ends with ]%%. For example:

%%[ InsertData('SomeDE','FirstName','John','LastName','Smith') ]%%

You must log in to answer this question.

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