Asynchronous Request Processing

This section describes asynchronous request processing in more detail.

Available Operations

Asynchronous equivalents are available for several synchronous operations, as shown in the table below.

Asynchronous Operation

Synchronous Equivalent

asyncAddList

addList

asyncUpdateList

updateList

asyncUpsertList

upsertList

asyncDeleteList

deleteList

asyncGetList

getList

asyncSearch

search

asyncInitializeList

initializeList

Understanding Asynchronous Requests and Responses

When submitting an asynchronous request, the request is similar to the equivalent synchronous call. The following code illustrates an asynchronous request for a list of customer records.

          <soap:Body>
   <platformMsgs:asyncGetList>
      <platformMsgs:baseRef internalId="87" type="customer" xsi:type="platformCore:RecordRef"></platformMsgs:baseRef>
      <platformMsgs:baseRef internalId="176" type="customer" xsi:type="platformCore:RecordRef"></platformMsgs:baseRef>
   </platformMsgs:asyncGetList>
</soap:Body> 

        

The response, however differs in that only information about the request is returned. This information includes a unique identifier for the request, which is enclosed in the jobId tags.

          <soapenv:Body>
   <asyncGetListResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
      <asyncStatusResult xmlns="urn:core_2017_1.platform.webservices.netsuite.com">
         <jobId>ASYNCWEBSERVICES_563214_053120061943428686160042948_4bee0685</jobId>
         <status>pending</status>
         <percentCompleted>0.0</percentCompleted>
         <estRemainingDuration>0.0</estRemainingDuration>
      </asyncStatusResult>
   </asyncGetListResponse>
</soapenv:Body> 

        

Later, you can use the checkAsyncStatus or getAsyncResult operations to track the asynchronous request. To identify the specific request about which you need data, refer to it by its job Id.

Usage Notes

Be aware of the following characteristics of asynchronous processing:

Related Topics

General Notices