Human Capital Management Blog Posts by Members
Explore blogs from customers or SAP partners to gain best practices and fresh insights to succeed.
cancel
Showing results for 
Search instead for 
Did you mean: 
sohamK2025
Participant
2,748

Introduction:

In today's post, I’ll walk you through how to use Postman to execute a CompoundEmployee delta query using SAP SuccessFactors SFAPI (SOAP). If you’ve ever struggled with 415 errors, INVALID_SESSION, or the infamous "last_modified_on is mandatory" message — this blog is for you!

Why Use Postman?

Postman is an excellent tool for testing APIs, and it can even handle SOAP calls if configured correctly. Using it with SAP SuccessFactors allows integration consultants to quickly verify query formats and responses before building them into CPI or middleware logic.

Step 1: Login to SFAPI via SOAP

Operation: POST

Endpoint: https://<your-datacenter>/sfapi/v1/soap

Headers:

Content-Type: text/xml

Body:

 

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <Body>
        <login xmlns="urn:sfobject.sfapi.successfactors.com">
            <credential>
                <companyId>yourCompanyID</companyId>
                <username>yourUserID</username>
                <password>yourPassword</password>
            </credential>
        </login>
    </Body>
</Envelope>

 

You'll get back a sessionId. Save it — you'll use it in the next step.

Below is the screenshot of success sessionId:

SessionIDSessionID

Step 2: Query CompoundEmployee with Delta Mode

Operation: POST

Endpoint: https://<your-datacenter>/sfapi/v1/soap

Headers:

Content-Type: text/xml

Body:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:urn="urn:sfobject.sfapi.successfactors.com">
   <soapenv:Header>
      <urn:SessionHeader>
         <urn:sessionId>{Enter SessioID from previous step}</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:query>
         <urn:queryString>
            SELECT person,
                   personal_information,
                   address_information,
                   email_information,
                   phone_information,
                   employment_information,
                   job_information,
                   SecondaryAssignments
            FROM CompoundEmployee
            WHERE last_modified_on > to_datetime('2025-04-01T00:00:00Z')
         </urn:queryString>
         <urn:param>
            <urn:name>maxRows</urn:name>
            <urn:value>800</urn:value>
         </urn:param>
         <urn:param>
            <urn:name>queryMode</urn:name>
            <urn:value>delta</urn:value>
         </urn:param>
         <urn:param>
            <urn:name>resultOptions</urn:name>
            <urn:value>changedSegmentsOnly+renderPreviousTags</urn:value>
         </urn:param>
      </urn:query>
   </soapenv:Body>
</soapenv:Envelope>

 

Below is the screenshot of success response:

Success ResponseSuccess Response

Common Errors and Fixes:

 

Error Reason Fix

415 Unsupported Media TypeWrong content typeSet Content-Type: text/xml;charset=UTF-8
INVALID_SESSIONSession expired or not passedEnsure you're using the sessionId from login
INVALID_SFQL – last_modified_onMissing required field for deltaAdd WHERE last_modified_on > to_datetime(...)
FAILED_XML_SCHEMA_VALIDATIONWrong XML tagsUse <credential> not <username>/<password>

Conclusion:

Running CompoundEmployee queries through Postman is a great way to test your logic before embedding it into your integration solution. Whether you're pulling full snapshots or just deltas, having this method in your toolkit can save time and headaches during development.

Let’s Connect:

If you found this helpful or have questions about SAP CPI, SFAPI, or integrations in general, feel free to comment or connect. Always happy to learn and share with the community!

6 Comments