1

Guys I have couple of questions on ExactTarget SOAP requests, and hopefully you have the answer. Anyway thanks in advance for looking at the question.

1). My goal is to create a triggered send using ExactTarget and I believe this can be done using send_triggeredsend_email method in https://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/send_triggeredsend_email/.

Could you please correct me if I am wrong here.

  1. In order to fill the Definition_Key parameter in the request, I believe we should first send a request to creating_a_triggered_send_definition method.

But here I am constantly getting the following error. - Exception occurred during [CreateTriggeredSendDefinition] ErrorID: 852043495

Please find the request below. Please note here I uses the details retrieved from retrieving_dataextension_object method as customer key, etc.

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://exacttarget.com/wsdl/partnerAPI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Header>
      <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken>
            <wsse:Username>XXXXX</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXXX</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
      <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Options/>
         <Objects xsi:type="TriggeredSendDefinition">            
            <SendClassification>
               <PartnerKey xsi:nil="true"/>
                <ObjectID>29767c11-2281-e411-aea6-38eaa71427a1</ObjectID>
                <CustomerKey>testDataExtension</CustomerKey>
            </SendClassification>            
         </Objects>
      </CreateRequest>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

1 Answer 1

1

In order to create and send a triggered send through the API - there are a few steps you have to go through to get there. You can set up the triggered send through the UI if you plan on reusing the triggered send and the email template. Often times - setting up a few triggered sends in using the UI works in most cases.

Since your question is specifically about creating a triggered send with the API - here are the pieces you need.

1) Valid Email 2) Send Source - Triggered Send Data Extension created 3) Send Classification - this can be the default - but you will need the information from that in the initial step 4) Create, Start, Send Triggered Send - soap request bodies below.

Create Triggered Send Definition

<soapenv:Body>
  <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
     <Objects xsi:type="TriggeredSendDefinition">
        <PartnerKey xsi:nil="true"/>
        <ObjectID xsi:nil="true"/>
        <CustomerKey>ET_TriggeredSendDefinition</CustomerKey>
        <Name>Exacttarget TriggeredSend Definition demo 1</Name>
        <Description>Exacttarget TriggeredSend Definition demo desc</Description>
        <SendClassification>
           <PartnerKey xsi:nil="true"/>
           <CustomerKey>ET_SendClassification</CustomerKey>
           <ObjectID xsi:nil="true"/>
        </SendClassification>
        <Email>
           <PartnerKey xsi:nil="true"/>
           <ObjectID xsi:nil="true"/>
           <ID>8565</ID>
           <CustomerKey>ET_Email</CustomerKey>
        </Email>
        <!-- must use the data extension created with Triggered Send Template-->
        <SendSourceDataExtension>
           <CustomerKey>ET_DataExtension_TriggeredSend</CustomerKey>
        </SendSourceDataExtension>
        <TriggeredSendStatus>Active</TriggeredSendStatus>
     </Objects>
  </CreateRequest>

Setting TriggeredSendStatus to active should eliminate additional update calls - but if your sends don't work, you may have to perform an update to set that property to active.

Send the Triggered Send

   <soapenv:Body>
      <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Objects xsi:type="TriggeredSend">
            <TriggeredSendDefinition>
               <CustomerKey>ET_TriggeredSend</CustomerKey>
            </TriggeredSendDefinition>
            <Subscribers>
               <EmailAddress>[email protected]</EmailAddress>
               <SubscriberKey>ET_Subscriber_Key</SubscriberKey>
            </Subscribers>
         </Objects>
      </CreateRequest>
   </soapenv:Body>
2
  • Thanks a lot Kelly it was really helpful. I found this very useful and detailed too. An extension to what you have summarized here.
    – Dilruk
    Commented Jan 7, 2015 at 10:07
  • For hitting create a triggered send request, we need to add username and password. Could you please let me know what should be the password value? Is it a security token, combination of password and security token or access token. I have used all of these, but I get either "login failed" or "invalid security token errors."
    – Sarang
    Commented Feb 4, 2019 at 9:31

You must log in to answer this question.

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