SOAP API Retrieve request does not work with SimpleOperator when value is set to "equals" and "notEquals"
Trailblazer Community

SOAP API Retrieve request does not work with SimpleOperator when value is set to "equals" and "notEquals"

Marketing Cloud API

Last updated 2021-09-09 ·Reference W-9855647 ·Reported By 2 users

In Review

Summary
SOAP Retrieve TriggeredSendDefinition object does not work with SimpleOperator when value is set to "equals" and "notEquals" it actually retrieves unexpected results.

Repro
When retrieving the TriggeredSendDefinition object with SimpleOperator value set to "equals" and "notEquals", it would not retrieve the expected results. Example below:

<?xml version="1.0" encoding="UTF-8"?>

<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 xmlns="http://exacttarget.com">{TOKEN}</fueloauth>

</soapenv:Header>

<soapenv:Body>

<RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">;

<RetrieveRequest>

<ObjectType>TriggeredSendDefinition</ObjectType>

<Properties>Name</Properties>

<Properties>TriggeredSendStatus</Properties>

<Filter xsi:type="ns1:SimpleFilterPart" xmlns:ns1="http://exacttarget.com/wsdl/partnerAPI">;

<Property>TriggeredSendStatus</Property>

<SimpleOperator>equals</SimpleOperator>

<Value>Active</Value>

</Filter>

</RetrieveRequest>

</RetrieveRequestMsg>

</soapenv:Body>

</soapenv:Envelope>



"equals" filter will respond with no send definitions
"not equals" will retrieve all send definitions no matter the TriggeredSendStatus

Workaround
use the "IN" operator

<Filter xsi:type="ns1:SimpleFilterPart" xmlns:ns1="http://exacttarget.com/wsdl/partnerAPI">
<Property>TriggeredSendStatus</Property>
<SimpleOperator>IN</SimpleOperator>
<Value>Active</Value>
<Value>Active</Value>
</Filter>

The IN operator requires at least 2 values, and they can be the same

Reported By (2)

Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.