Why is Pinpoint email not accepting "Context" attributes?

0

Problem Pinpoint is not working per documentation.

Background

  1. I'm issuing a SendMessagesCommand via the Javascript SDK v3
    • I'm specifying a Template
    • I'm providing a Context object (i.e., k/v pairs)
    • The Template has one single attribute that is supposed to be substituted {{tripId}}
  2. When the Template has a "Default Value" set for {{tripId}}, the command is successful and an email arrives, but with the default value.
  3. When the Template's "Default Value" is empty, the command is successful but no email arrives.

So... I'm stuck with two outcomes:

  1. "SUCCESSFUL" send and an email that gets delivered with the wrong value (the default); or
  2. "SUCCESSFUL" send and no email delivered

Obviously, neither work. I would troubleshoot this further, but I'm not even sure how (?). This feels like some sort of internal Pinpoint error or unclear documentation...

質問済み 3ヶ月前135ビュー
2回答
0
承認された回答

Hi,

Thank you for sharing your observations in detail. I would like to mention that I am able to replicate the behaviour shared by you. Further, I am also able to move past this behaviour after using Substitutions instead of Context either under Addresses or Endpoints in the SendMessages API call.

I used the following command at my end :-

aws pinpoint send-messages --application-id <application-id> --message-request file://file.json

The contents of file.json is mentioned below :-

{
    "Addresses": {
        "<email>": {
            "ChannelType": "EMAIL",
            "Substitutions": {
                "tripId": ["1223445"]
            }
        }
    },
    "MessageConfiguration": {
        "EmailMessage": {
            "FromAddress": "<from-address>"
        }
    },
    "TemplateConfiguration": {
        "EmailTemplate": {
          "Name": "tesst",
          "Version": "1"
        }
    }
}

In case of any follow up queries, please reach out to us via creating a support case with us.

AWS
サポートエンジニア
Mukul_V
回答済み 3ヶ月前
0

Yes, I was able to make this discovery as well.

I wish AWS would update the Pinpoint documentation to more clearly define when to use Context vs. Substitutions, since they are very similar as to how to use them.

回答済み 3ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ