Enterprise Search

Sample Request Message-search Call-Enterprise API

POST https://na1.salesforce.com/services/Soap/c/10.0 HTTP/1.1 
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol
1.1.4322.573) 
Content-Type: text/xml; charset=utf-8  
SOAPAction: "" 
Content-Length: 510 
Expect: 100-continue 
Host: na1.salesforce.com 

<?xml version="1.0" encoding="utf-8"?>   
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:urn="urn:enterprise.soap.sforce.com">
  <soapenv:Header>
     <urn:SessionHeader>
        <urn:sessionId>QwWsHJyTPW.1pd0_jXlNKOSU</urn:sessionId>
     </urn:SessionHeader>
  </soapenv:Header>
  <soapenv:Body>
     <urn:search>
        <urn:searchString>find {4159017000} in phone fields returning
     contact(id, phone, firstname, lastname), lead(id, phone,
     firstname, lastname), account(id, phone, name)</urn:searchString>
     </urn:search>
  </soapenv:Body>
</soapenv:Envelope>

Sample Response Message-search Call-Enterprise API

HTTP/1.1 200 OK 
Server: sfdc 
Content-Type: text/xml; charset=utf-8 
Transfer-Encoding: chunked 
Date: Tue, 29 May 2007 22:09:56 GMT
  
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns="urn:enterprise.soap.sforce.com">
  <soapenv:Body>
     <searchResponse>
        <result>
           <searchRecords>
              <record xsi:type="sf:sObject">
                 <sf:type>Contact</sf:type>
                 <sf:Id>003D000000OXGBPIA5</sf:Id>
                 <sf:Id>003D000000OXGBPIA5</sf:Id>
                 <sf:Phone>(415) 901-7000</sf:Phone>
                 <sf:FirstName>Marc</sf:FirstName>
                 <sf:LastName>Benioff</sf:LastName>
              </record>
           </searchRecords>
           <searchRecords>
              <record xsi:type="sf:sObject">
                 <sf:type>Account</sf:type>
                 <sf:Id>001D000000HS2SsIAL</sf:Id>
                 <sf:Id>001D000000HS2SsIAL</sf:Id>
                 <sf:Phone>(415) 901-7000</sf:Phone>
                 <sf:Name>salesforce.com</sf:Name>
              </record>
           </searchRecords>
        </result>
     </searchResponse>
  </soapenv:Body>
</soapenv:Envelope>

Back to Sample SOAP Messages