2

I have created a custom activity built with Node.js that POSTS to a text message service and sends an SMS. The activity works great, the last thing I need to button up is passing personalization data into the HTML Modal.

Basically, I have a text input area that allows the users to input the content they would like to send to the consumer. I need to have the personalization tag populated before posting!

Currently this happens:

Hi %%FirstName%%

I need:

Hi Nate

I have worked with the whole {{Contacts.Attributes.DataExtension.Field}} and it works in my Javascript. Do I need to define it in my HTML for it to pass this personalization data? Any input would help!

Thanks!

2
  • I would suggest using the TreatAsContent() function in your SMS script. This will evaluate any ampscript code you include in your POST. Commented May 30, 2018 at 14:00
  • Thanks David, could you maybe give me an example of how that function would be used? Would it work in Node? Here is how the js evaluates the text area content: $.each(inArguments, function (index, inArgument) { $.each(inArgument, function (key, val) { if (key === 'TextMessage') { $('#text-message-body').val(val); } }); }); Commented May 30, 2018 at 21:19

1 Answer 1

1

I have figured this out!

{{Contacts.Attributes.DataExtension.Field}} fills in the correct data!

You must log in to answer this question.

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