2

It sounds like my issue is similar to this question. I'm currently POSTing (via Postman) to the following:

https://www.exacttargetapis.com/messaging/v1/messageDefinitionSends/key:MY_CORRECT_KEY/send?access_token=MY_CORRECT_TOKEN

I'm getting a 202 response code with the following body:

{
    "requestId": "REQUEST_ID_HERE",
    "responses": [
        {
            "recipientSendId": "RECIPIENT_ID_HERE",
            "hasErrors": false,
            "messages": [
                "Queued"
            ]
        }
    ]
}

However, when I check in Salesforce, my Queued in "Interactions -> Triggered Emails" stays stuck at 0. I have run the "Validate", and it passes with flying colors. I am able to generate a "Preview" within Salesforce using my data extension. I'm also able to trigger other API Triggered Emails with this approach, up until this one. Is there a way to debug the issue without a costly service call?

Data extension setup: Data extension screenshot

2
  • In your triggered send Data extension, is there a field defined as EmailAddress Type
    – Bo Hu
    Commented Oct 4, 2017 at 1:00
  • @BoHu Yes, added a screen shot. We're creating a Canadian site that will mirror our US site. We're using the same data extension for the Canadian site that we're using for the US site, and the US extension sends just fine as is. Commented Oct 4, 2017 at 1:53

2 Answers 2

1

I'll assume you're looking at the same account to which you're making this REST call. I've gotten that mixed up before -- using Postman Environments, etc.

If new rows are getting added to the Data Extension, but your email is not getting sent, it's usually an email scripting issue. You can rule that out by swapping out the email in your triggered send definition and publishing the changes. My go-to email for that kind of testing is this:

<html>
<head>
  <style>
    body, a, input {font-family:sans-serif;}
  </style>
</head>
<body style="font-family:sans-serif">
%%[/* Modify to view AMPScript <div style="display:none"> */

var @firstName
set @firstName = AttributeValue("firstName")

/*</div>*/
]%%
Hi, %%=v(@firstName)=%%.<br><br>
<a href="%%profile_center_url%%">Profile/Preference Center</a>
<br><a href="%%subscription_center_url%%">Subscription Center</a>
<br><a href="%%unsub_center_url%%">One-Click Unsubscribe</a>
<p>This email was sent by:
<b>%%Member_Busname%%</b>
<br>%%Member_Addr%%
<br>%%Member_City%%, %%Member_State%%, %%Member_PostalCode%%, %%Member_Country%%</p>
<custom name="opencounter" type="tracking">
</body>
</html>

Just for a test, I thought I'd submit one myself. I was able to successfully fire off an email with this configuration:

POST /messaging/v1/messageDefinitionSends/key:Trigger_Test/send HTTP/1.1
Host: www.exacttargetapis.com
Authorization: Bearer ZZZZZZZZZZZZZZZZZZZZZ
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: e301c2d2-dffb-5f10-0e4a-0e6033d8294a

{
    "To": {
        "Address": "[email protected]", 
        "SubscriberKey": "[email protected]", 
        "ContactAttributes": {
            "SubscriberAttributes": {
                "FirstName": "Adam"
            }
        }
    }
}

Response:

{
    "requestId": "fd11bca1-7bcb-45d1-9136-cbdd9782ad86",
    "responses": [
        {
            "recipientSendId": "fd11bca1-7bcb-45d1-9136-cbdd9782ad86",
            "hasErrors": false,
            "messages": [
                "Queued"
            ]
        }
    ]
}
7
  • +1 for the attempt, and a debug method, but still no send. I copied your email in, paused the interaction, published changes, and started the interaction again. The response is the same, but still nothing queued or sent. Commented Oct 4, 2017 at 14:28
  • Had that worked, and it turned out to be a scripting error, is there a log we can check somewhere to see what the error is/was? Why is the hasErrors always false, if it happened to have scripting errors? Commented Oct 4, 2017 at 14:28
  • I generally filter the TSD Data Extension by date (which you should have if you don't) and use send-preview for debugging. Commented Oct 4, 2017 at 14:36
  • Any spaces before/after the field names in your DE? That has tripped me up before, also. Commented Oct 4, 2017 at 14:37
  • What's this TSD Data Extension you speak of? :) The send-preview works great for this email, which would make me think that it isn't a scripting error, but idk. Doesn't appear to be any spaces before or after the field names. The "body" of the email is almost a straight copy of the US version, which sends fine in production. Commented Oct 4, 2017 at 14:43
0

I ran into this when updating to a new OMS and found that it is the XML attribute missing required tags that are used within the email AMPscript.

Although the required data fields in the data extension were all set in the request, the email did not render and the send failed (without writing data into trigger or data extension in SFMC) because the required data to populate the AMPscript was missing from the XML attribute.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .