Empower Help

Search:

Display Legacy Contents

IndexBookmarkPrint

Home > Factory Productivity and Scheduling > Advanced Topics > Import Export Data > Empower API > Using The API To Retrieve Data > Jobs

Jobs

 
 Job information can be retrieved through the API using the function calls


1. GetJobData(jobOurReference As String)


The function takes a single argument of data type String and returns the Job Data if it exists.
 
    
As a result the request body should be based on the following

<soapenv:Body>
      <web:GetJobData>
         <web:jobOurReference>JOB OUR REFERENCE</web:jobOurReference>
      </web:GetJobData>
 </soapenv:Body>

Response XML Format,
   <soap:Body>
         <GetJobDataResponse xmlns="http://empowersoftware.co.nz/WebService">
            <GetJobDataResult>
               <JobOurReference>JOB OUR REFERENCE</JobOurReference>
               <CustomerName>CUSTOMER NAME</CustomerName>
               <JobDate>JOB DATE</JobDate>
               <JobRequiredDate>REQUIRED BY DATE<JobRequiredDate>
               <JobCustomerOrderNumber>CUSTOMER ORDER NUMBER</JobCustomerOrderNumber>
               <JobEstCost/>PRICE</JobEstCost>
               <JobPriority>PRIORITY</JobPriority>
               <JobSalesPerson>SALES PERSON</JobSalesPerson>
               <JobOurReferenceGroupName>REFERENCE GROUP</JobOurReferenceGroupName>
               <JobDeliveryAddress>DELIVERY ADDRESS</JobDeliveryAddress>
               <JobNotes>NOTES/COMMENTS</JobNotes>
               <JobDispatched>JOB DISPATCHED</JobDispatched>
               <JobDispatchDate>JOB DISPATCH DATE</JobDispatchDate>         
            </GetJobDataResult>
         </GetJobDataResponse>
      </soap:Body>




2. GetJobDetails(jobOurReference As String)


The function takes a single argument of data type String and returns the Job Data if it exists.
 
    
As a result the request body should be based on the following

<soapenv:Body>
      <web:GetJobDetails>
         <web:jobOurReference>JOB OUR REFERENCE</web:jobOurReference>
      </web:GetJobDetails>
 </soapenv:Body>

Response XML Format,
   <soap:Body>
         <GetJobDetailsResponse xmlns="http://empowersoftware.co.nz/WebService">
            <GetJobDetailsResult>
               <JobOurReference>JOB OUR REFERENCE</JobOurReference>
               <CustomerName>CUSTOMER NAME</CustomerName>
               <JobDate>JOB DATE</JobDate>
               <JobRequiredDate>REQUIRED BY DATE<JobRequiredDate>
               <JobCustomerOrderNumber>CUSTOMER ORDER NUMBER</JobCustomerOrderNumber>
               <JobEstCost/>PRICE</JobEstCost>
               <JobPriority>PRIORITY</JobPriority>
               <JobSalesPerson>SALES PERSON</JobSalesPerson>
               <JobOurReferenceGroupName>REFERENCE GROUP</JobOurReferenceGroupName>
               <JobDeliveryAddress>DELIVERY ADDRESS</JobDeliveryAddress>
               <JobNotes>NOTES/COMMENTS</JobNotes>
               <JobDispatched>JOB DISPATCHED</JobDispatched>
               <JobDispatchDate>JOB DISPATCH DATE</JobDispatchDate>          
                <JobItems>
                <!--Zero or more repetitions:-->
                  <JobItemData>
                     <ProductName>PRODUCT NAME</ProductName>
                     <JobItemQty>QUANTITY</JobItemQty>
                     <JobItemField1>FIELD 1</JobItemField1>
                     <JobItemField2>FIELD 2</JobItemField2>
                     <JobItemInstructions>INSTRUCTIONS</JobItemInstructions>
                     <JobItemId>JOBITEM ID</JobItemId>              
                  </JobItemData>
               </JobItems>
            </GetJobDetailsResult>
         </GetJobDetailsResponse>
      </soap:Body>



3. GetDispatchedJobs(StartDate As String, EndDate As String)



The function takes two arguments of data type String (where the Dispatched date lies between the Start and End Dates) and returns appropriate Job Data.

As a result the request body should be based on the following

<soapenv:Body>
      <web:GetDispatchedJobs>
         <web:StartDate>START DATE</web:StartDate>
         <web:EndDate>END DATE</web:EndDate>
      </web:GetDispatchedJobs>
   </soapenv:Body>

Response XML Format

<soap:Body>
      <GetDispatchedJobsResponse xmlns="http://empowersoftware.co.nz/WebService">
         <GetDispatchedJobsResult>
            <JobData>
               <JobOurReference>JOB OUR REFERENCE</JobOurReference>
               <CustomerName>CUSTOMER NAME</CustomerName>
               <JobDate>JOB DATE</JobDate>
               <JobRequiredDate>REQUIRED BY DATE</JobRequiredDate>
               <JobCustomerOrderNumber>CUSTOMER ORDER NUMBER</JobCustomerOrderNumber>
               <JobDispatchDate>JOB DISPATCHED DATE</JobDispatchDate>
            </JobData>
         </GetDispatchedJobsResult>
      </GetDispatchedJobsResponse>
   </soap:Body>

4. GetDispatchedJobsAndTasks(StartDate As String, EndDate As String)

The function takes two arguments of data type String (where the Dispatched date lies between the Start and End Dates) and returns appropriate Job Data.

As a result the request body should be based on the following

<soapenv:Body>
      <web:GetDispatchedJobsAndTasks>
         <web:StartDate>START DATE</web:StartDate>
         <web:EndDate>END DATE</web:EndDate>
      </web:GetDispatchedJobsAndTasks>
   </soapenv:Body>

Response XML Format

<soap:Body>
      <GetDispatchedJobsAndTasksResponse xmlns="http://empowersoftware.co.nz/WebService">
         <GetDispatchedJobsAndTasksResult>
            <JobDispatchData>
       <JobOurReference>JOB OUR REFERENCE</JobOurReference>
               <CustomerName>CUSTOMER NAME</CustomerName>
               <JobDate>JOB DATE</JobDate>
               <JobRequiredDate>REQUIRED BY DATE</JobRequiredDate>
               <JobDispatchDate>JOB DISPATCHED DATE</JobDispatchDate>
               <Tasks>
       <!--Zero or more repetitions:-->
                  <TaskData>
                     <TaskId>TASK ID</TaskId>
                     <TaskBudget>TASK BUDGET</TaskBudget>
                     <ProductName>PRODUCT NAME</ProductName>
                     <ProcessName>PROCESS NAME</ProcessName>
                     <TaskActual>TASK ACTUAL HOURS</TaskActual>
                     <TaskQuantity>QUANTITY</TaskQuantity>
                  </TaskData> 
               </Tasks>
            </JobDispatchData>            
         </GetDispatchedJobsAndTasksResult>
      </GetDispatchedJobsAndTasksResponse>
   </soap:Body>

5. GetMaterialsProvidedForJob(jobOurReference As String)

This function takes a single argument of data type String and returns the MaterialsProvidedData if it exists.

As a result the request body should be based on the following

 <soapenv:Body>
      <web:GetMaterialsProvidedForJob>
         <web:jobOurReference>JOB OUR REFERENCE</web:jobOurReference>
      </web:GetMaterialsProvidedForJob>
 </soapenv:Body>

Response XML Format,

<soap:Body>
      <GetMaterialsProvidedForJobResponse xmlns="http://empowersoftware.co.nz/WebService">
         <GetMaterialsProvidedForJobResult>
            <MaterialProvidedData>
               <JobOurReference>JOB OUR REFERENCE</JobOurReference>
               <MaterialName>MATERIAL NAME</MaterialName>
               <MaterialCode>MATERIAL CODE</MaterialCode>
               <MaterialUnitOfMeasure>MATERIAL UNIT OF MEASURE</MaterialUnitOfMeasure>
               <MatQtyProvided>MAT QTY PROVIDED</MatQtyProvided>
               <MatQtyInStock>MAT QTY IN STOCK</MatQtyInStock>
               <BomId>BOM ID</BomId>
            </MaterialProvidedData>
         </GetMaterialsProvidedForJobResult>
      </GetMaterialsProvidedForJobResponse>
   </soap:Body>




The following data types are used

JobData


JobOurReference As String
CustomerName As String
JobDate As String
JobRequiredDate As String
JobCustomerOrderNumber As String
JobEstCost As String
JobPriority As String
JobSalesPerson As String
JobOurReferenceGroupName As String
JobDeliveryAddress As String
JobNotes As String
JobItems As List(Of JobItemData)
JobInvoiceNo As String
JobDispatched As String
JobDispatchDate As String

JobItemData

ProductName As String
JobItemQty As String
JobItemField1 As String
JobItemField2 As String
JobItemInstructions As String
JobItemId as String   

JobDispatchData

JobOurReference As String
CustomerName As String
JobDate As String
JobRequiredDate As String
JobDispatchDate As String
Tasks As List(Of TaskData)

TaskData

Public TaskId As String
Public TaskBudget As String
Public ProductName As String
Public ProcessName As String
Public TaskActual As String
Public TaskQuantity As String

MaterialProvidedData     

JobOurReference As String
MaterialName As String
MaterialCode As String
MaterialUnitOfMeasure As String
MatQtyProvided As Double
MatQtyInStock As Double
BomId As Long

For more information see
Example Code
WDSL Schema

 



 



See also