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
已提問 10 個月前檢視次數 341 次
3 個答案
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
已回答 10 個月前
  • 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
已回答 10 個月前
0

sending sms work from home i am intwrsted

已回答 9 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南