Quantcast
Viewing all articles
Browse latest Browse all 2504

Search Criteria in SOAP Get Request

Topic by Umer

I need to fetch all incidents which are recently updated that is their status is changed. I want to use standard SOAP WSDL for this. The external application will send a date as input and rightnow will return all the incidents that were updated after that that. So I will be using Last Updated Date column here. It is also possible for external application to send a range of date to fetch updated incidents.

I downloaded a generic WSDL and in SOAPUI I am trying to achieve this but I could not apply search criteria and neither could find sample requests to get an idea. I tried with Lookup name by using GET request but it seems like GET is to fetch only a single record for incident or may be i am not understanding this at the moment.

On the 2nd thought I tried using ROQL but getting all the columns in the output:

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="urn:messages.ws.rightnow.com/v1_3" xmlns:v11="urn:base.ws.rightnow.com/v1_3">
   <soapenv:Header>
      <v1:ClientInfoHeader>
         <v1:AppID>Query Objects</v1:AppID>
      </v1:ClientInfoHeader>
      <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" mustUnderstand="1">
         <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>
      <v1:QueryObjects>
         <v1:Query>SELECT Incident FROM Incident WHERE Incident.ID=2600</v1:Query>         
         <v1:PageSize>100</v1:PageSize>
      </v1:QueryObjects>
   </soapenv:Body>
</soapenv:Envelope>

Response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <n0:QueryObjectsResponse xmlns:n0="urn:messages.ws.rightnow.com/v1_3" xmlns:n2="urn:base.ws.rightnow.com/v1_3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n1="urn:objects.ws.rightnow.com/v1_3">
         <n0:Result>
            <n0:RNObjectsResult>
               <n0:RNObjects xsi:type="n1:Incident">
                  <n2:ID id="2600"/>
                  <n2:LookupName>160108-000009</n2:LookupName>
                  <n2:CreatedTime>2016-01-08T17:59:51.000Z</n2:CreatedTime>
                  <n2:UpdatedTime>2017-04-28T15:01:58.000Z</n2:UpdatedTime>
                  <n1:AssignedTo>
                     <n1:Account>
                        <n2:ID id="440"/>
                     </n1:Account>
                     <n1:StaffGroup>
                        <n2:ID id="100001"/>
                     </n1:StaffGroup>
                  </n1:AssignedTo>
                  <n1:Category>
                     <n2:ID id="61"/>
                  </n1:Category>
                  <n1:Channel>
                     <n2:ID id="6"/>
                  </n1:Channel>
                  <n1:ClosedTime>2016-01-31T14:42:45.000Z</n1:ClosedTime>
                  <n1:CreatedByAccount>
                     <n2:ID id="510"/>
                  </n1:CreatedByAccount>
                  <n1:Disposition>
                     <n2:ID id="20"/>
                     <n2:Parents xsi:type="n2:NamedReadOnlyID">
                        <n2:ID id="16"/>
                     </n2:Parents>
                  </n1:Disposition>
                  <n1:InitialResponseDueTime>2016-09-15T20:31:00.000Z</n1:InitialResponseDueTime>
                  <n1:Interface>
                     <n2:ID id="1"/>
                  </n1:Interface>
                  <n1:Language>
                     <n2:ID id="1"/>
                  </n1:Language>
                  <n1:LastResponseTime>2016-01-30T13:32:10.000Z</n1:LastResponseTime>
                  <n1:Organization>
                     <n2:ID id="6"/>
                  </n1:Organization>
                  <n1:PrimaryContact>
                     <n1:Contact>
                        <n2:ID id="509"/>
                     </n1:Contact>
                  </n1:PrimaryContact>
                  <n1:Queue>
                     <n2:ID id="4"/>
                  </n1:Queue>
                  <n1:ReferenceNumber>160108-000009</n1:ReferenceNumber>
                  <n1:ResolutionInterval>15196</n1:ResolutionInterval>
                  <n1:ResponseEmailAddressType>
                     <n2:ID id="0"/>
                  </n1:ResponseEmailAddressType>
                  <n1:Severity>
                     <n2:ID id="3"/>
                  </n1:Severity>
                  <n1:Source>
                     <n2:ID id="1001"/>
                     <n2:Parents xsi:type="n2:NamedReadOnlyID">
                        <n2:ID id="32002"/>
                     </n2:Parents>
                  </n1:Source>
                  <n1:StatusWithType>
                     <n1:Status>
                        <n2:ID id="2"/>
                     </n1:Status>
                     <n1:StatusType>
                        <n2:ID id="2"/>
                     </n1:StatusType>
                  </n1:StatusWithType>
                  <n1:Subject>Do you ship outside the US?</n1:Subject>
               </n0:RNObjects>
            </n0:RNObjectsResult>
            <n0:Paging>
               <n0:ReturnedCount>1</n0:ReturnedCount>
               <n0:StartIndex>0</n0:StartIndex>
               <n0:QueryHandle/>
            </n0:Paging>
         </n0:Result>
      </n0:QueryObjectsResponse>
   </soapenv:Body>
</soapenv:Envelope>

 

But I only want to get the Status of the incidents in the response but Incident.Status is not working.

Please need help to proceed on this.


Viewing all articles
Browse latest Browse all 2504

Trending Articles