12-04-2018 04:03 PM
Hello, I am trying to retrieve data from some of the Marketing Cloud’s Objects. Using the ClickEvent object; I am wondering if anyone has worked with Marketing Cloud. Currently I have the following set up and can obtain an access token but not able to go further.
I have my WSDL set up and passing the bearer token and it seems to be correct
Using the ClickEvent instructions but these kind of vague from Marketing Cloud:
I am not able to figure out how to retrieve the ClickEvent data.
Any help would be awesome. Thank you ahead of time.
Solved! Go to Solution.
12-05-2018 02:52 PM
Never mind, I have it working. I ended up having to change the XML in the Customize Envelope. I covered up sensitive data with XXXwordingXXX but below produced results.
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>
<wsse:Security soapenv:mustUnderstand="1"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-XXXAccountIDXXX"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>XXXCompanyEmail@email.comXXX</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXPasswordXXX</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<RetrieveRequestMsg
xmlns="http://exacttarget.com/wsdl/partnerAPI">
<RetrieveRequest>
<Options/>
<ObjectType>ClickEvent</ObjectType>
<Properties>Client.ID</Properties>
<Properties>TriggeredSendDefinitionObjectID</Properties>
<Properties>SendID</Properties>
<Properties>SubscriberKey</Properties>
<Properties>EventDate</Properties>
<Properties>EventType</Properties>
<Properties>URL</Properties>
<Properties>BatchID</Properties>
<Filter xsi:type="par:SimpleFilterPart"
xmlns:par="http://exacttarget.com/wsdl/partnerAPI">
<Property>Client.ID</Property>
<SimpleOperator>equals</SimpleOperator>
<Value>7293243</Value>
</Filter>
<Filter xsi:type="par:ComplexFilterPart"
xmlns:par="http://exacttarget.com/wsdl/partnerAPI">
<LeftOperand xsi:type="par:SimpleFilterPart">
<Property>Client.ID</Property>
<SimpleOperator>equals</SimpleOperator>
<Value>7293243</Value>
</LeftOperand>
<LogicalOperator>AND</LogicalOperator>
<RightOperand xsi:type="par:SimpleFilterPart">
<Property>EventDate</Property>
<SimpleOperator>between</SimpleOperator>
<DateValue>2017-11-01T03:00:00.000Z</DateValue>
<DateValue>2017-11-30T02:59:59.999Z</DateValue>
</RightOperand>
</Filter>
</RetrieveRequest>
</RetrieveRequestMsg>
</soapenv:Body>
</soapenv:Envelope>
12-05-2018 02:52 PM
Never mind, I have it working. I ended up having to change the XML in the Customize Envelope. I covered up sensitive data with XXXwordingXXX but below produced results.
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>
<wsse:Security soapenv:mustUnderstand="1"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-XXXAccountIDXXX"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>XXXCompanyEmail@email.comXXX</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXPasswordXXX</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<RetrieveRequestMsg
xmlns="http://exacttarget.com/wsdl/partnerAPI">
<RetrieveRequest>
<Options/>
<ObjectType>ClickEvent</ObjectType>
<Properties>Client.ID</Properties>
<Properties>TriggeredSendDefinitionObjectID</Properties>
<Properties>SendID</Properties>
<Properties>SubscriberKey</Properties>
<Properties>EventDate</Properties>
<Properties>EventType</Properties>
<Properties>URL</Properties>
<Properties>BatchID</Properties>
<Filter xsi:type="par:SimpleFilterPart"
xmlns:par="http://exacttarget.com/wsdl/partnerAPI">
<Property>Client.ID</Property>
<SimpleOperator>equals</SimpleOperator>
<Value>7293243</Value>
</Filter>
<Filter xsi:type="par:ComplexFilterPart"
xmlns:par="http://exacttarget.com/wsdl/partnerAPI">
<LeftOperand xsi:type="par:SimpleFilterPart">
<Property>Client.ID</Property>
<SimpleOperator>equals</SimpleOperator>
<Value>7293243</Value>
</LeftOperand>
<LogicalOperator>AND</LogicalOperator>
<RightOperand xsi:type="par:SimpleFilterPart">
<Property>EventDate</Property>
<SimpleOperator>between</SimpleOperator>
<DateValue>2017-11-01T03:00:00.000Z</DateValue>
<DateValue>2017-11-30T02:59:59.999Z</DateValue>
</RightOperand>
</Filter>
</RetrieveRequest>
</RetrieveRequestMsg>
</soapenv:Body>
</soapenv:Envelope>
12-05-2018 02:59 PM
One more thing. Since the SOAP Envelope has a Username and Password, I was also able to remove the JSON Generator and POST (Access Token) Snaps.