0

we are using a REST API to try to trigger an email. We setted up everything as wrote inside the Exact Target documentation and we get the data inside the data extension but we cannot see any trigger email going out. Our JSON File is looking like:

//Using Send ID POST https://www.exacttargetapis.com/messaging/v1/messageDefinitionSends/DATAEXTENSIONID/send //Or Using Customer Key POST https://www.exacttargetapis.com/messaging/v1/messageDefinitionSends/key:cust_key/send

{"From":{"Address":"abcd@absdf.de","Name":"abcd@absdf.de"},"To":{"Address":"asdfg123@123.pro","SubscriberKey":"asdfg123@123.pro","ContactAttributes":{"SubscriberAttributes":{"Shop":"de","Customer_number":""}}},"OPTIONS":{"RequestType":"ASYNC"}}$
{

    "From":{
        "Address":"abcd@absdf.de",
        "Name":"abcd@absdf.de"
    },
    "To":{
        "Address":"asdfg123@123.pro",
        "SubscriberKey":"asdfg123@123.pro",
        "ContactAttributes":{
            "SubscriberAttributes":{
                "Shop":"de",
                "Customer_number":""
            }
        }
    },
    "OPTIONS":{
        "RequestType":"ASYNC"
    }

}

Do you have any idea, why the calling is not working correctly?

Thanks a lot in advance!

  • I assume the fact that you have two duplicate objects is a copy/paste error. What response payload to you receive back from your request? Also, when you select Triggered Emails from the Interactions menu in the email app, do you see the 'queued' column increment (for the corresponding email) when you make the post request? And if so, does it then progress to 'Errored' column or 'Completed' column a few minutes later? Refer to screenshot at postimg.org/image/wf9ptkx2v – Eliot Harper Apr 25 '16 at 4:01
  • Hi Eliot, Thanks a lot for your reply. I don't receive any response, we lanch the call but we don't have anything coming back, this is the reason why is not working. The values are updating correctly inside the Data Extension but is not going out any triggered email: awesomescreenshot.com/image/1194084/…. We really have no idea if the calling that I posted is correct or we are missing something. Do you have any idea? – M.Giorgio Apr 25 '16 at 7:37
0

The fact that you are receiving an empty payload would indicate that there is something wrong with the request or route. You should expect to see a response payload that looks like:

{
  "requestId": "edacedc4-54ec-450b-a333-84ac93a13e88",
  "responses": [
    {
      "recipientSendId": "edacedc4-54ec-450b-a333-84ac93a13e88",
      "hasErrors": false,
      "messages": [
        "Queued"
      ]
    }
  ]
}

I've only used this method with the External Key of the Triggered Send. I have absolutely no idea why the documentation states that you should use the 'Customer Key' as this simply is not the case. Try the following route:

POST https://www.exacttargetapis.com/messaging/v1/messageDefinitionSends/key:{{triggeredSendExternalKey}}/send

Where {{triggeredSendExternalKey}} is the external key from the triggered send you have created. For example, 300 in the case of the screenshot below:

triggered send

If you are still having issues, check the following:

  1. Review the permissions for the app you created in App Center (where the OAuth credentials are created). You will need permission to send email
  2. Check that the Triggered Send is running. If not, select the triggered send and click the 'Start/Restart' button from the Triggered Sends page.
  • Hi Eliot, now is working and we received this answer: exacttargetapis.com/messaging/v1/messageDefinitionSends/… and this is what we get – M.Giorgio Apr 25 '16 at 15:33
  • ###{"requestId":"1d40460f-32a7-4731-97ca-1b23ee63bf7c","responses":[{"recipientSendId":"1d40460f-32a7-4731-97ca-1b23ee63bf7c","hasErrors":false,"messages":["Queued"]}]}stdClass Object ( [requestId] => 1d40460f-32a7-4731-97ca-1b23ee63bf7c [responses] => Array ( [0] => stdClass Object ( [recipientSendId] => 1d40460f-32a7-4731-97ca-1b23ee63bf7c [hasErrors] => [messages] => Array ( [0] => Queued ) ) ) ) – M.Giorgio Apr 25 '16 at 15:34
  • But we dont send out actually any email, do you have any idea? – M.Giorgio Apr 25 '16 at 15:34
  • That looks better. You can see from the response that the message is queued, which is a good sign. Do you see the queue count increment from the Triggered Emails page when you make the request? If it's erroring, have you tried sending the email as a guided send? It could be that there is an error in your AMPscript. If you still have issues I'd be happy to walk through this on a brief webinar. You can connect with me at linkedin.com/in/eliot. – Eliot Harper Apr 25 '16 at 23:24
  • Hi Eliot, thanks again for reply. We are using a HTML template without AMPscript just to be sure that there are no problem and I also used a guide send to see if the email is going out correctly and I received, so seems that we have a problem with the coding or with the Trigger Set Up inside the automation. I will really glade you if we can discuss together. Thanks again – M.Giorgio Apr 26 '16 at 8:05
0

I have been playing around with this and there are a couple of issues I have come across and had to resolve with trial an error. The documentation is a bit light in these areas.

  1. Firstly check that the REST API IP Addresses are white listed on your side. A couple were used with the soap service but there were additional ones which were not, which is why it worked intermittently.

  2. Make sure that your Data Extension matches exactly the code that your passing to the down to the types. For example if you have the DS expecting an number and you pass a string, otherwise the response will say "hasErrors:false Queued", but its not queued.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.