Oracle Web Services On Demand Guide > Web Services On Demand API Calls > Service API Calls >

SalesProcessQueryPage


Returns sales process information for a particular user, the default sales process, or all sales processes for a company.

Usage

You use the SalesProcessQueryPage method to retrieve sales process information including sales stages, order of the sales stages, default probability, and associated opportunity types.

The ListOfSalesProcess argument contains elements for the various fields of a sales process, and for the associated sales stages and opportunity types. There are child elements ListofSalesStage and ListofOpportunityType.

In requests, if the <SalesProcessId> element does not contain a value, information for all of the sales processes for the company are returned.

If the <SalesProcessId> element contains a value, information for sales processes for the user or role with that sales process ID are returned. You can use the User service to query for the SalesProcId value for a user.

If the <Default> element contains the value Y, information for the default sales process is returned.

For most of the child elements of ListOfSalesProcess, you can use the sortorder and sortsequence attributes to specify how fields in the returned sales process information are sorted.

NOTE:  The Name and Description fields of SalesProcess do not support the sort specification.

Arguments

Table 61 describes the arguments taken by the SalesProcessQueryPage method.

Table 61. Arguments Taken by the SalesProcessQueryPage Method
Name
Description
Required
Default
I/O

ListOfSalesProcess

The list of sales processes queried (input), and after query execution, the list of sales processes returned (output).

Yes

Not applicable

Input/Output

PageSize

The maximum number of records displayed on a page following a query.

No

10

Input

StartRowNum

Indicates the row from which the SalesProcessQueryPage method starts to return records.

For example, if PageSize=100 and you want to return records 1-100, you set StartRowNum to 0. Then, if you want to return records 101-200, you set StartRowNum to 100, and run the query again. You continue doing this until the last page is returned. In this way, you can return all records for a particular query.

No

0

Input

recordcountneeded

Indicates whether a record count for the object is to be returned.

No

False

Input

searchspec

Indicates the search specification for a field or for all the fields of an object.

No

Not applicable

Input

sortsequence

An integer value that determines the order of the sort specification.

No

Not applicable

Input

sortorder

Determines the sort order for the records returned by the query, either ASC for ascending or DESC for descending.

No

ASC

Input

LOVLanguageMode

The language mode for picklists, see The LOVLanguageMode Argument.

No

LIC

Input

LastPage

A value that indicates whether or not the last value in the query set has been returned.

Not applicable

Not applicable

Output

recordcount

An integer value that indicates the record count for the object

Not applicable

Not applicable

Output

Return Value of the Call

The following information is returned by ListOfsalesProcess which contains a <SalesProcess> element for each sales process that matches the query:

  • Description. The description of the sales process.
  • Name. The sales process name.
  • Translate. Whether the sales process is marked for translation.
  • SalesProcessId. The sales process ID.
  • Default. Whether this sales process is the default sales process.
  • ListOfOpportunityType. Information contained in the following child elements for each opportunity type:
    • Id. The opportunity type ID.
    • Type. The opportunity type name.
  • ListOfSalesStage. Information contained in the following child elements for each sales stage:
    • Name. The name of the sales stage.
    • SalesCategoryName. The category that the sales stage falls under.
    • Order. The sequence of the sales stages as they appear in the picklist.
    • Probability. The default probability for the sales stage.
    • Description. The description of the sales stage.
    • TranslationLanguage. The translation language.

For more information about sales process information, see Oracle CRM On Demand Online Help.

Sample SOAP Requests and Responses

This topic contains sample SOAP requests that invoke SalesProcessQueryPage.

Sample SOAP Request 1 - SalesProcessQueryPage with pagesize, startrownum and recordcountneeded Attributes

The following SOAP request retrieves the sales processes defined for the company but only returns a maximum of one record at the SalesProcess parent object level, a maximum of one record at the OpportunityType child object level, and a maximum of five records at the SalesStage level by specifying pagesize, startrownum, and recordcountneeded attributes at each of the list of objects levels.

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <soap:Header>

      <wsse:Security>

         <wsse:UsernameToken>

            <wsse:Username>%%%USERNAME%%%</wsse:Username>

            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">%%%PASSWORD%%%</wsse:Password>

         </wsse:UsernameToken>

      </wsse:Security>

   </soap:Header>

   <soap:Body>

      <SalesProcessQueryPage_Input xmlns="urn:crmondemand/ws/salesproc/">

         <ListOfSalesProcess pagesize="1" startrownum="1" recordcountneeded="true">

            <SalesProcess>

               <Id />

               <Name />

               <Description />

               <Default />

               <ListOfOpportunityType pagesize="1" startrownum="0" recordcountneeded="false">

                  <OpportunityType>

                     <Id />

                     <Type />

                  </OpportunityType>

               </ListOfOpportunityType>

               <ListOfSalesStage pagesize="5" startrownum="0" recordcountneeded="true">

                  <SalesStage>

                     <Name />

                  </SalesStage>

               </ListOfSalesStage>

            </SalesProcess>

         </ListOfSalesProcess>

      </SalesProcessQueryPage_Input>

   </soap:Body>

</soap:Envelope>

Sample SOAP Response 1

The following is the response for sample SOAP request 1:

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

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <SOAP-ENV:Body>

      <ns:SalesProcessQueryPage_Output xmlns:ns="urn:crmondemand/ws/salesproc/">

         <ListOfSalesProcess xmlns="urn:/crmondemand/xml/salesprocess/Data" recordcount="2" lastpage="true">

            <SalesProcess>

               <Id>HRZ780-IDIT2</Id>

               <Name>Renewal Sales Process</Name>

               <Default>N</Default>

               <Description>Simplified process for renewal sales.</Description>

               <ListOfOpportunityType lastpage="true">

                  <OpportunityType>

                     <Id>HRZ780-IDIV0</Id>

                     <Type>Renewal</Type>

                  </OpportunityType>

               </ListOfOpportunityType>

               <ListOfSalesStage recordcount="4" lastpage="true">

                  <SalesStage>

                     <Name>Re-Engage</Name>

                  </SalesStage>

                  <SalesStage>

                     <Name>Proposal</Name>

                  </SalesStage>

                  <SalesStage>

                     <Name>Closed/Won</Name>

                  </SalesStage>

                  <SalesStage>

                     <Name>Closed/Lost</Name>

                  </SalesStage>

               </ListOfSalesStage>

            </SalesProcess>

         </ListOfSalesProcess>

      </ns:SalesProcessQueryPage_Output>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Sample SOAP Request 2 - SalesProcessQueryPage with searchspec, sortorder, and sortsequence Attributes

The following SOAP request queries the sales process by specifying the search criteria in the searchspec attribute. It returns all sales processes with a name like Default* and all child sales stages of the parent sales process with a name like Closed*. It also demonstrates using the sortorder and sortsequence attributes to sort the result set.

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <soap:Header>

      <wsse:Security>

         <wsse:UsernameToken>

            <wsse:Username>%%%USERNAME%%%</wsse:Username>

            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">%%%PASSWORD%%%</wsse:Password>

         </wsse:UsernameToken>

      </wsse:Security>

   </soap:Header>

   <soap:Body>

      <SalesProcessQueryPage_Input xmlns="urn:crmondemand/ws/salesproc/">

         <ListOfSalesProcess recordcountneeded="true">

            <SalesProcess searchspec="[Name] LIKE 'Default*'">

               <Id />

               <Name />

               <Description />

               <Default />

               <ListOfOpportunityType>

                  <OpportunityType>

                     <Id />

                     <Type />

                  </OpportunityType>

               </ListOfOpportunityType>

               <ListOfSalesStage recordcountneeded="true">

                  <SalesStage searchspec="[Name] LIKE 'Closed*'">

                     <Name sortorder="ASC" sortsequence="0"></Name>

                  </SalesStage>

               </ListOfSalesStage>

            </SalesProcess>

         </ListOfSalesProcess>

      </SalesProcessQueryPage_Input>

   </soap:Body>

</soap:Envelope>

Sample SOAP Response 2

The following is the response for sample SOAP request 2:

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

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <SOAP-ENV:Body>

      <ns:SalesProcessQueryPage_Output xmlns:ns="urn:crmondemand/ws/salesproc/">

         <ListOfSalesProcess xmlns="urn:/crmondemand/xml/salesprocess/Data" recordcount="1" lastpage="true">

            <SalesProcess>

               <Id>HRZ780-I5RS0</Id>

               <Name>Default Sales Process</Name>

               <Default>Y</Default>

               <Description>This sales process is the default defined for your company.</Description>

               <ListOfOpportunityType lastpage="true">

                  <OpportunityType>

                     <Id>HRZ780-IDIVS</Id>

                     <Type>New Business</Type>

                  </OpportunityType>

               </ListOfOpportunityType>

               <ListOfSalesStage recordcount="2" lastpage="true">

                  <SalesStage>

                     <Name>Closed/Lost</Name>

                  </SalesStage>

                  <SalesStage>

                     <Name>Closed/Won</Name>

                  </SalesStage>

               </ListOfSalesStage>

            </SalesProcess>

         </ListOfSalesProcess>

      </ns:SalesProcessQueryPage_Output>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Oracle Web Services On Demand Guide, Version 25.0 (Oracle CRM On Demand Release 37) Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.