Query Input Payloads Structure

Payloads that execute the component's Query method are often referred to as Query payloads and are used to retrieve or export data from SunSystems.

The structure of the <Payload> element in a query payload is different to input payloads for other methods. The following shows an Account Query payload. For brevity, <ErrorContext>, <User> and <SunSystemsContext> are omitted:

<?xml version="1.0" encoding="UTF-8"?>
<SSC>
  <Payload>
    <Filter>
      <Item name="/Accounts/AccountCode" operator="EQU" value="S0567"/>
    </Filter>
    <Select>
      <Accounts>
        <AccountCode/>
        <AccountType/>
        <Description/>
       </Accounts>
    </Select>
  </Payload>
</SSC>

The <Payload> element contains two elements:

  • A <Filter> element in which you specify the selection criteria for the query.
  • A <Select> element in which you specify which particular data items are to be retrieved
Remarque: If you submit a payload that omits the <Filter> and <Select> elements, all data items and all data values are returned. As a result, extremely large output payloads may be generated; these may take considerable time to process. We recommend that all query input payloads have the <Filter> and <Select> elements present. See the section Performance.