0

Wonder if you can assist me in SMS to update Data Extension syntax. I tried all kinds of options and I’m getting process errors. If I remove the AmpScript and just add a message it go to the person no problem. So I know it’s the syntax that I’m using.

%%[
var @response
set @response = UpdateData("DC4ME_SMS_RESPONSE", 1, "mobile", "Mobile_Number", "addeddate", SystemDateToLocalDate(now()))
]%%%%=v(@response)=%%

tried with just the system date and getting the same error.

%%[
var @response
set @response = UpsertData('DC4ME_SMS_RESPONSE', 1, 'addeddate',SystemDateToLocalDate(now()))
]%%
4
  • Can you add your error to your question? – Samuel Dare Aug 29 '18 at 15:35
  • ERR: There was an error processing your message – Robert Wynter Aug 29 '18 at 15:56
  • What data type is field you are trying to upsert into? – Samuel Dare Aug 29 '18 at 16:38
  • Name Data Type mobile Number response Text addeddate Date – Robert Wynter Aug 29 '18 at 17:16
0

Your Mobile_Number is a literal string. Should be a variable:

%%[

var @response
set @response = UpdateData("DC4ME_SMS_RESPONSE", 1, "mobile", Mobile_Number, "addeddate", SystemDateToLocalDate(now()))

]%%%%=v(@response)=%%

Reference

5
  • Yes, thank you. I realized that after I publish this and I also changed it to UpsertData instead of UpdateData. I'm still getting the same processing error. Is there something I'm missing with some kind of setting. Do I need to enable anything in Mobile Connect in order for it to read Ampscript and Data Extension – Robert Wynter Aug 29 '18 at 17:21
  • Do it have anything to do with SUBSCRIBER RELATIONSHIP and Primary Key. What should be set for both of these is that's the case? – Robert Wynter Aug 29 '18 at 17:35
  • Why is your Mobile field a Number data type and not Phone? – Adam Spriggs Aug 30 '18 at 13:07
  • Ah, you are correct. Number maxes out at 2,147,483,648. So a standard US phone number 15,551,231,234 is beyond its capacity. not sure why I selected Number. I'll test it out with Phone. Thank you sir – Robert Wynter Aug 30 '18 at 13:41
  • Changed DT to phone and it working. However, not all responses are being added to the Data Extension. Some of my testers get added some do not. Some that used to get the reply no longer get or they get the reply but nothing shows in the data extension. I've had at least 10 co-workers test for me and all I have are three records in the DE – Robert Wynter Aug 30 '18 at 19:49

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.