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달 전136회 조회
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달 전

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

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

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

관련 콘텐츠