Push Notification Template using message helpers

0

I'm creating a push notification template and would like to use the message helpers to control the messages depending on the custom attributes that I use, by following this documentation https://docs.aws.amazon.com/pinpoint/latest/userguide/message-template-helpers.html. But unfortunately I'm getting this kind of error.Error occurs when sending the push notification on test messaging in pinpoint

this is my current push notification template and just adding the helper on my message attributes, by just checking if the numbers are equal then they return the specified string messages.

"GCMMessage": {
    "notification": {
      "title": "サンプルメッセージ送信 タイトル",
      "body": "Welcome to AWS"
    },
    "data": {
      "message": "{{#eq 1111 11211}} Your City is on Alert Level 1! {{else}} Your City is on Alert Level 2! {{/eq}}"
    }
  },

I tried the message helpers also on creating Emails and its a success. So I'm wondering what's wrong. Is the syntax for push notification template(JSON) different when using the message helpers? Because I see no alternative syntax written on the documentation for push templates, so I'm assuming its just the same for the other templates. Can anyone provide any guides or resource that I can look with? Thank in advance.

已提問 2 年前檢視次數 90 次
沒有答案

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

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

回答問題指南