1

This code doesn't work. It say the customer key (triggered send) doesn't exist. If I use a user that has access to that particular business unit only then this code works.

<soap:Body>
<api:CreateRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:api="http://exacttarget.com/wsdl/partnerAPI">
                <api:Options>
                                <api:Client>
                                                <api:ClientID>98989</api:ClientID>
                                </api:Client>
                </api:Options>
                <api:Objects xsi:type="api:TriggeredSend">
                                <api:TriggeredSendDefinition>
                                                <api:CustomerKey>Test_SGH_Order_Cancel_TS</api:CustomerKey>
                                </api:TriggeredSendDefinition>
                                <api:Subscribers>
                                                <api:EmailAddress>XXXX@salesforce.com</api:EmailAddress>
                                                <api:SubscriberKey>XXXX@salesforce.com</api:SubscriberKey>
                                                <api:Attributes>
                                                                <api:Name>FROMEMAILADDRESS</api:Name>
                                                                <api:Value>XXX@XXX.com</api:Value>
                                                </api:Attributes>
                                                <api:Attributes>
                                                                <api:Name>TransactionID</api:Name>
                                                                <api:Value>S23232</api:Value>
                                                </api:Attributes>
                                                <api:Attributes>
                                                                <api:Name>OrderID</api:Name>
                                                                <api:Value>SDJUEM</api:Value>
                                                </api:Attributes>
                                                <api:Attributes>
                                                                <api:Name>EmailType</api:Name>
                                                                <api:Value>E</api:Value>
                                                </api:Attributes>

                </api:Subscribers>
        </api:Objects>
</api:CreateRequest>
</soap:Body>
  • This is expected - the client ID you specifiy, would be a business unit and only a user that has access to that business unit would be able to operate on it. – Kelly J Andrews Feb 13 '15 at 18:40
  • Correct. But in this scenario the user has access to the correct Business Unit and a few other Business Units and if specify the business unit id in the soap request shouldn't it know where to do? – user10250 Feb 13 '15 at 18:43
2

Try moving the client object into the create request, and change clientId (depracated) to ID.

<soap:Body>
  <api:CreateRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:api="http://exacttarget.com/wsdl/partnerAPI">
    <api:Objects xsi:type="api:TriggeredSend">
      <api:Client>
        <api:ID>98989</api:ID>
      </api:Client>
      <api:TriggeredSendDefinition>
        <api:CustomerKey>Test_SGH_Order_Cancel_TS</api:CustomerKey>
      </api:TriggeredSendDefinition>
      <api:Subscribers>
        <api:EmailAddress>XXXX@salesforce.com</api:EmailAddress>
        <api:SubscriberKey>XXXX@salesforce.com</api:SubscriberKey>
        <api:Attributes>
          <api:Name>FROMEMAILADDRESS</api:Name>
          <api:Value>XXX@XXX.com</api:Value>
        </api:Attributes>
        <api:Attributes>
          <api:Name>TransactionID</api:Name>
          <api:Value>S23232</api:Value>
        </api:Attributes>
        <api:Attributes>
          <api:Name>OrderID</api:Name>
          <api:Value>SDJUEM</api:Value>
        </api:Attributes>
        <api:Attributes>
          <api:Name>EmailType</api:Name>
          <api:Value>E</api:Value>
        </api:Attributes>
      </api:Subscribers>
    </api:Objects>
  </api:CreateRequest>
</soap:Body>

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.