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>
Best Answer
Try moving the
client
object into the create request, and changeclientId
(depracated) toID
.