0

I have set up following activities in Automation Studio:

See below for Order: 1. File Drop 2. Import the data into a data extension 3. Import Mobile Contacts Activity 4. Automation SMS Send activity - In this outbound template I am using the following ampscript: Your amount is %%=Lookup("DENAME","Column","MobileNumber",MOBILE_NUMBER,"Sent","N")=%%. %%=UpdateData("DENAME",1, "MobileNumber", MOBILE_NUMBER, "Sent","Y")=%%

The SMS is received on my device but it also has a number along with it. For example the message say - Your amount is $10.00 and there is 1 beside it. If I run the automation again by dropping a new file with same mobile number in the file, the message reads - Your amount is $11.00 2.

Can somebody suggest if I am doing something wrong.

2 Answers 2

1

The UpdateData functions return the number of rows affected. It is usually used in landing pages

Use updateDE function which is Send time support data modification function and doesnot return any value.

%%=UpdateDE("DENAME",1, "MobileNumber", MOBILE_NUMBER, "Sent","Y")=%%

UpdateDE Salesforce Documentation

2
  • Thanks @Praveen. I did not use this function as the documentation says that it should be used for email messages during send time. So I went with UpdateData as it should be used for landing pages and SMS's. Anyways SMS are getting delivered with UpdateDE. Nov 8, 2017 at 18:16
  • Hey @Pravin, looks like I spoke too early. This %%=UpdateDE("DENAME",1, "MobileNumber", MOBILE_NUMBER, "Sent","Y")=%% is not updating the SENT column of the data extension to Y. I am using this Ampscript in the Outbound Automation template type in Mobile connect. Nov 8, 2017 at 19:38
1

It finally worked with UpdateData funcrtion by wrapping the function with brackets: %%[UpdateData("DENAME",1, "MobileNumber", MOBILE_NUMBER, "Sent","Y")]%%

You must log in to answer this question.

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