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...

feita há 3 meses135 visualizações
2 Respostas
0
Resposta aceita

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
ENGENHEIRO DE SUPORTE
Mukul_V
respondido há 3 meses
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.

respondido há 3 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas