0

My DE looks like this enter image description here

The records in this DE are as shown: enter image description here

I am trying to use soap api to retrive data from this DE. however i am getting errors. can you help me what is wrong in this request


request :

<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>
    <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-24440876"
            xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>${#Project#UserName}</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">${#Project#Password}</wsse:Password>
        </wsse:UsernameToken>
    </wsse:Security>
</soapenv:Header>
<soapenv:Body>
    <RetrieveRequestMsg
        xmlns="http://exacttarget.com/wsdl/partnerAPI">
        <RetrieveRequest>
            <ObjectType>DataExtensionObject[Reporting_Sent_Today]</ObjectType>
            <Properties>Market</Properties>
            <Properties>CampCode</Properties>
            <Properties>CampName</Properties>
            <Properties>Hour</Properties>
            <Properties>Count</Properties>
            <Filter xsi:type="SimpleFilterPart">
                <Property>Market</Property>
                <SimpleOperator>equals</SimpleOperator>
                <Value>NLD</Value>
            </Filter>
        </RetrieveRequest>
    </RetrieveRequestMsg>
</soapenv:Body>

and the response is :

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <soap:Header>
      <wsa:Action>RetrieveResponse</wsa:Action>
      <wsa:MessageID>urn:uuid:570ebd29-a9e9-4eea-a7b7-21e2c83772b4</wsa:MessageID>
      <wsa:RelatesTo>urn:uuid:fd288cd0-602b-46a3-a80e-399d5d94bb49</wsa:RelatesTo>
      <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
      <wsse:Security>
         <wsu:Timestamp wsu:Id="Timestamp-88b1d8df-84a4-4d0f-9b7b-44b5131792eb">
            <wsu:Created>2018-12-26T10:20:49Z</wsu:Created>
            <wsu:Expires>2018-12-26T10:25:49Z</wsu:Expires>
         </wsu:Timestamp>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <RetrieveResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <OverallStatus>Error: Invalid object name 'C100012058.01_Reporting_Sent_Today'.</OverallStatus>
         <RequestID>275b95fb-04ca-4378-a476-d08a8279305f</RequestID>
      </RetrieveResponseMsg>
   </soap:Body>
</soap:Envelope>

can you tell me know what is wrong .

2

I noticed this is a shared Data Extension, which is why you are getting these errors. Shared DEs require you to target the Parent BU in order to access it. You could try adding in the Client ID into your call:

  ...<RetrieveRequest>
        <ClientIDs>
           <ClientID>{{parentMID}}</ClientID>
        </ClientIDs>
        <ObjectType>...

or you would have to use Authentication (Oauth or Legacy User/Pass) that is assigned to the parent BU when making this call.

Please note that using the ent. prefix (used in SQL Queries, etc. to reference shared DEs) will not work here.

References: An awesome answer by Adam and Eliot

This other great answer with sample of ClientID implementation

| improve this answer | |
  • I tried to add the client id , but now i get bad request as error message – Chandrashekhar Dautpure Dec 28 '18 at 21:20
  • <RetrieveRequest> <ObjectType>DataExtensionObject[01_Reporting_Sent_Today]</ObjectType> <ClientIDs> <ClientID>100010512</ClientID> </ClientIDs> <Properties>Market</Properties> <Properties>CampCode</Properties> <Properties>CampName</Properties> <Properties>Hour</Properties> <Properties>Count</Properties> <Filter xsi:type="SimpleFilterPart"> <Property>Market</Property> <SimpleOperator>equals</SimpleOperator> <Value>NLD</Value> </Filter> </RetrieveRequest> – Chandrashekhar Dautpure Dec 28 '18 at 21:21
0

@Chandrashekhar Dautpure try like this

<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>
<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>
    <wsse:Username>*********</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss- 
   username-token-profile-1.0#PasswordText">******</wsse:Password>
 </wsse:UsernameToken>
  </wsse:Security>
 </soapenv:Header>
<soapenv:Body>
<RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
   <RetrieveRequest>
       <ObjectType>DataExtensionObject[DE Name here]</ObjectType>
     <ClientIDs><ID>use parent business Unit ID here </ID></ClientIDs>
     <Properties>Market</Properties>
        <Properties>CampCode</Properties>
        <Properties>CampName</Properties>
        <Properties>Hour</Properties>
        <Properties>Count</Properties>
        <Filter xsi:type="SimpleFilterPart">
            <Property>Market</Property>
            <SimpleOperator>equals</SimpleOperator>
            <Value>NLD</Value>
        </Filter>
  </RetrieveRequest>
 </RetrieveRequestMsg>
 </soapenv:Body>

| improve this answer | |
-1

Please re-check your Data Extension's name.

DataExtensionObject[Reporting_Sent_Today]

As per the screenshot shared, looks like the name is "01_Reporting_Sent_Today". This may be one of the issue why request is failing.

| improve this answer | |
  • 01_Reporting_Sent_Today is name while Reporting_Sent_Today is customerkey. tried with both , didnt work – Chandrashekhar Dautpure Dec 26 '18 at 12:26
  • It has to use CustomerKey only. Your SOAP request is correct. I tried executing it at my end and it works. Are you executing in the right business unit? – Maneesh Dec 26 '18 at 13:58
  • I referred this link developer.salesforce.com/docs/…. It says that the Example DE that they use in that particular field is the name of DE. They have mentioned "// Example DE is the name of the data extension". @Maneesh kindly correct me if my understanding is wrong. – Krati Garg Dec 26 '18 at 14:01
  • @Krati Looks like DE Name is working too for this request. For most requests, it always needs the Customer Key. – Maneesh Dec 26 '18 at 14:11

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.