Pinpoint: message template helpers not working?

0

Hi,

We want to use message template helpers in our templates and send them with a campaign via Pinpoint, but we can't get the message template helpers working. For instance, we have this: {{sha256 "hellothere"}}, but then we get the following error:

Attribute 'sha256' is not present in the rendering data.

I've also tried other helpers like {{capitalize "hellothere"}} and {{add 1 3}}, but they also don't work.

We also can't seem to get them to work via Test messaging within the Pinpoint dashboard.

Namstel
feita há um ano440 visualizações
3 Respostas
1

Hello Team,

I did create a quick SMS message template like below and testing via Test messaging from Pinpoint console worked for me.
Hello {{capitalize "test"}} Thank you. Your nbn appointment is now booked at {{add 1 3}} pm. Please find more details here {{sha256 "Hello World"}}

SMS message received like below

Hello Test Thank you. Your nbn appointment is now booked at 4.0 pm. Please find more details here a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e

Can you please share more information on the template or provide your steps, channels used and will deep dive from my side. Does other attributes are working and is it only message template helpers having issues?

AWS
respondido há um ano
  • Hello Sarath,

    Thanks for you reply!

    I think I've pinpointed (:D) where the issue lies.

    We're using the SDK to create a campaign and when we do, we're sending the email content in the MessageConfiguration EmailMessage object. I noticed that when creating a campaign via the Pinpoint dashboard, the actual Pinpoint template is set in the TemplateConfiguration EmailTemplate object.

    So I guess it then boils down to:

    • Can we get the message template helpers (I guess the clue is in the name) to work in the MessageConfiguration EmailMessage object? Or
    • Do we make a reference to the Pinpoint template via the TemplateConfiguration EmailTemplate object.

    I think I know the answer but I'd love your input.

0

Hello Team,

You need to use TemplateConfiguration while using any message templates (including message template helpers in it) from AWS Pinpoint SDK.

If interested ( not for your current use case) from Messageconfiguration, we have something like substitutions which can override variables like example below. Can be used in campaigns as well.

aws pinpoint send-messages --application-id <Appid> --message-request '{"MessageConfiguration": {"SMSMessage":{"Body":"{{name}} says Hi"}},"Endpoints": {"testendpoint": {"Substitutions":{"name":["Sarath"]}}}}'

AWS
respondido há um ano
0

sending sms work from home i am intwrsted

respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas