Find your content:

Search form

You are here

MessageDefinitionSends Recipient Name Field Ignored by API

 
Share

Am I doing something wrong? It doesn't appear that the Name field is recognized.

This is the body I'm submitting via the rest api to the endpoint defined here: https://code.exacttarget.com/api/messaging-messagedefinitionsends-send.

{
  'To': 
    {
      'SubscriberKey': u'randy.c.shults@gmail.com', 
      'Name': 'Randy Shults', 
      'Address': u'randy.c.shults@gmail.com'
    }, 
   'From': 
    {
      'Name': 'CommandIQ Team', 
      'Address': 'team@commandiq.com'
    }
}

But the message headers arrive in my inbox like this (notice there is no recipient name):

Received: by ba2.mta.exacttarget.com id h9o6d2163hs0 for <randy.c.shults@gmail.com>; Tue, 15 Apr 2014 22:48:51 -0600 (envelope-from <bounce-206_HTML-1856017-1867-6255504-1@bounce.s6.exacttarget.com>)
From: "CommandIQ Team" <team@commandiq.com>
To: <randy.c.shults@gmail.com>
Subject: Hi4
Date: Tue, 15 Apr 2014 22:48:51 -0600
List-Unsubscribe: <mailto:leave-fd531670730b5c392848-fe9315787062047c72-ff2915787363-fe9412727061017d71-ffce15@leave.s6.exacttarget.com>
MIME-Version: 1.0
x-job: 6255504_1867

Attribution to: Randy

Possible Suggestion/Solution #1

I think it may be something really simple here - your JSON payload doesn't validate with single quotes. Try replacing with double quotes like this:

{
  "To": 
    {
      "SubscriberKey': "randy.c.shults@gmail.com", 
      "Name": "Randy Shults", 
      "Address": "randy.c.shults@gmail.com"
    }, 
   "From": 
    {
      "Name": "CommandIQ Team", 
      "Address": 'team@commandiq.com"
    }
}

Attribution to: Kelly J Andrews
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/32812

My Block Status

My Block Content