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
질문됨 일 년 전440회 조회
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
답변함 일 년 전
  • 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
답변함 일 년 전
0

sending sms work from home i am intwrsted

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠