getJobActions Web Services API return empty result for some days

Overview:

getJobsActions API is used to Pull Timesheet Data / Daily Punches from StreetSmart System for processing by other systems like Payroll Systems.

  1. For some specific days, the getJobActions Web Services API Returns empty results though there were activities recorded for the day.mceclip1.png
  2. In some cases, it may return an error result specifying that number of records returned is very high.mceclip2.png

Diagnosis:

The issue may be caused by any of the following reasons:

  1. There is a high level of activity for the specific day, for which it fails.
  2. The Job Data being extracted contains Images as part of the Form Data, like Proof of Delivery or Signatures.

Solution:

Based on the Diagnosis above the following solution can be applied:

  1. For periods with heavy worker activity on StreetSmart, call the API with smaller time windows as the web services have restrictions on the number of items that can be processed per call and the number of times calls can be made per minute. This article - Web Services Developer Guide has very good instructions on how to deal with these limits.
  2. The API can be called for a maximum period of 7 days.
  3. If the Image data like Proof of Delivery or Signature, is not required for the processing of data, the calls to getJobActions can be replaced with calls to getJobActionsWithoutImages Web Services API call.
  4. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:JobService">
      <soapenv:Header/>
      <soapenv:Body>
          <urn:getJobActionsWithoutImages>
            <urn:start>
                <urn:dateString>2021-09-24 00:00:00.000</urn:dateString>
            </urn:start>
            <urn:end>
                <urn:dateString>2021-09-24 12:00:00.000</urn:dateString>
            </urn:end>
          </urn:getJobActionsWithoutImages>
      </soapenv:Body>
    </soapenv:Envelope>
  5. This new API greatly reduces the size of the data packet thus reducing the load on the provider and well as the consumer system. It also speeds up processing on both ends thus increasing performance.

 

Comments

0 comments

Please sign in to leave a comment.