Document toolboxDocument toolbox

Integration ServiceOptimizer Cancel Job SOAP API

On This Page:

Related Pages:

The sp:JobCancelRequest API method can be used to cancel a job.

Description

Cancelling a job in ServiceOptimizer causes the the job to be completely removed from the system, although, if activated, an audit trail for the job will remain.

Definition

The definition of this API is:

Web Service

Type

Description

Req?

Val?

<sp:JobCancelRequest>

    

 

<jobID>?</jobID>

JobID

Identifier of the job that should be cancelled.

(tick)

(tick)


<cancelReason>





<cancelReasonId>?</cancelReasonId>cancelReasonIdCancellation reason ID.(error)(error)


<cancelDescription>?</cancelDescription>

cancelReasonDescFree-form text reason for cancellation.(error)(error)

</cancelReason>



</sp:JobCancelRequest>

    

Return Structure

The API returns a non-standard return structure.

 Click here to expand...

Web Service

Type

Description

Req?

Val?

<sp:JobCancelResponse>

    
  <result>?</result> This contains the standard return structure.  

 

<jobInfo>

 

This will only be present if the cancel request has succeeded.

 

 

 

 

<jobID>?</jobID>

JobID

 

 

 

 

 

<onHold>?</onHold>

Boolean

This indicates whether or not the Job is set 'on Hold'; the value returned is 'true' if the Job is On-Hold and 'false' otherwise.

 

 

 

 

<bookDuration>?</bookDuration>

unsigned int

For a non-all-day job, BookDuration returns the Actual Duration of the job if it’s known (i.e. the job has been logged on or cleared), or, if not, the Scheduled Duration. For an all-day job, BookDuration returns the same values, except if the job is in the in-tray, in which case SP_IntNoValue is returned since all-day jobs in the in-tray have no Scheduled Duration.

 

 

 

 

<disStatus>?</disStatus>

DisStatus

Current dispatch status for the job. Null if the job is unresourced.

 

 

 

 

<empID>?</empID>

EmpID

The employee the job is currently assigned to. Null if the job is in the unreasourced tray.

 

 

 

</jobInfo>

 

 

 

 

</sp:JobCancelResponse>

    

Return Codes

In addition to the Standard Return Codes, the possible Return Codes from this API are:

  • SP_OK (0)
  • SP_JOBID_INVALID (1)