0

I am referring to the help document to retrieve triggered send definition object. I explore on the landing page but it's not displaying any value.

Ideally, it should work as its working for Dataextension but not sure why it's not working for triggersend definition. Is there any workaround to retrieve the triggersend definition properties?

1 Answer 1

3

It looks like Retrieve on the TriggeredSendDefinition SOAP Object has picked up a bug where it doesn't retrieve any records where TriggeredSendStatus "equals" a specific value. Strangely, the "IN" operator works just fine.

AMPScript

%%[    
SET @rr = CreateObject("RetrieveRequest")  
SetObjectProperty(@rr, "ObjectType", "TriggeredSendDefinition")  
AddObjectArrayItem(@rr,"Properties","CustomerKey")  
AddObjectArrayItem(@rr,"Properties","Name")  
AddObjectArrayItem(@rr,"Properties","TriggeredSendStatus") 

SET @sfp = CreateObject("SimpleFilterPart")  
SetObjectProperty(@sfp, "Property", "TriggeredSendStatus")  
SetObjectProperty(@sfp, "SimpleOperator", "IN")  
AddObjectArrayItem(@sfp, "Value", "Active")
AddObjectArrayItem(@sfp, "Value", "Active") 
SetObjectProperty(@rr, "Filter", @sfp)  

SET @tsd = InvokeRetrieve(@rr)  

FOR @c = 1 TO RowCount(@tsd) DO    
SET @row = Row(@tsd ,@c)   
SET @TSDName = Field(@row ,'Name')   
SET @TSDKey = Field(@row ,'CustomerKey')   
]%%

Name: %%=v(@TSDName)=%%<br /> =
Key: %%=v(@TSDKey)=%%<br />
<br />%%[NEXT @c]%%

SOAP

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>
    <fueloauth>{{_token}}</fueloauth>
    </soapenv:Header>
    <soapenv:Body>
        <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
            <RetrieveRequest>
                <ObjectType>TriggeredSendDefinition</ObjectType>
                <Properties>ObjectID</Properties>
                <Properties>PartnerKey</Properties>
                <Properties>CreatedDate</Properties>
                <Properties>ModifiedDate</Properties>
                <Properties>Client.ID</Properties>
                <Properties>CustomerKey</Properties>
                <Properties>Email.ID</Properties>
                <Properties>List.ID</Properties>
                <Properties>Name</Properties>
                <Properties>Description</Properties>
                <Properties>TriggeredSendType</Properties>
                <Properties>TriggeredSendStatus</Properties>
                <Properties>HeaderContentArea.ID</Properties>
                <Properties>FooterContentArea.ID</Properties>
                <Properties>SendClassification.ObjectID</Properties>
                <Properties>SendClassification.CustomerKey</Properties>
                <Properties>SenderProfile.CustomerKey</Properties>
                <Properties>SenderProfile.ObjectID</Properties>
                <Properties>DeliveryProfile.CustomerKey</Properties>
                <Properties>DeliveryProfile.ObjectID</Properties>
                <Properties>PrivateDomain.ObjectID</Properties>
                <Properties>PrivateIP.ID</Properties>
                <Properties>AutoAddSubscribers</Properties>
                <Properties>AutoUpdateSubscribers</Properties>
                <Properties>BatchInterval</Properties>
                <Properties>FromName</Properties>
                <Properties>FromAddress</Properties>
                <Properties>BccEmail</Properties>
                <Properties>EmailSubject</Properties>
                <Properties>DynamicEmailSubject</Properties>
                <Properties>IsMultipart</Properties>
                <Properties>IsWrapped</Properties>
                <Properties>TestEmailAddr</Properties>
                <Properties>AllowedSlots</Properties>
                <Properties>NewSlotTrigger</Properties>
                <Properties>SendLimit</Properties>
                <Properties>SendWindowOpen</Properties>
                <Properties>SendWindowClose</Properties>
                <Properties>SuppressTracking</Properties>
                <Properties>Keyword</Properties>
                <Properties>List.PartnerKey</Properties>
                <Properties>Email.PartnerKey</Properties>
                <Properties>SendClassification.PartnerKey</Properties>
                <Properties>PrivateDomain.PartnerKey</Properties>
                <Properties>PrivateIP.PartnerKey</Properties>
                <Properties>Client.PartnerClientKey</Properties>
                <Properties>IsPlatformObject</Properties>
                <Properties>CategoryID</Properties>
                <Filter xsi:type="SimpleFilterPart">
                    <Property>TriggeredSendStatus</Property>
                    <SimpleOperator>IN</SimpleOperator>
                    <Value>Active</Value>
                    <Value>Active</Value>
                </Filter>
            </RetrieveRequest>
        </RetrieveRequestMsg>
    </soapenv:Body>
</soapenv:Envelope>
2
  • Thank you @Macca, this worked for me. Just want to understand, do we need to define "AddObjectArrayItem(@sfp, "Value", "Active")" twice? When I defined once it did not work.
    – Ranjan
    Commented Aug 19, 2020 at 6:59
  • Correct. What you were doing should work and I suspect did work at some stage when the answer you were referring to was written. As I said, it looks like there's a bug been introduced at some point and the "equals" operator doesn't seem to work anymore. So, instead, the workaround is to use the "IN" operator and you're giving a list of two (identical) values in which the TriggeredSendStatus should exist.
    – Macca
    Commented Aug 19, 2020 at 8:47

You must log in to answer this question.

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