Employee Location Track Data

There are two APIs that can be used to post employee location track data to WFM. A single object upload REST API to post single records directly to the main view in WFM and a bulk upload REST API to post records in bulk that are first written to stage view and then moved to main view either synchronously or asynchronously.

Single Object Upload REST API

This API can be used to post single employee location track record to WFM. The data is posted synchronously to the main view (Employee Location Track) in WFM. Multiple records cannot be posted through this API.

URL

POST ..lgfapi/v10/entity/employee_location_track/

Fields

Name Required Type Description
company_id X Integer Company ID
facility_id X Integer Facility ID
cw_user_id X Integer WMS Internal ID of the employee
location_barcode C String Barcode of the location defined in WMS locations UI. Either this should be sent OR XYZ Coordinates have to be sent
x_coordinate C Integer These should be sent if barcode is not sent. Field supports upto 38 digits regardless of decimal position. Maximum decimals is governed by the configuration in the facility for location coordinates, rounded up to decimals allowed. For example, if the decimal setting on location coordinates is 4 and the value sent in the payload is 123.456789, the value will be rounded to 123.4568
y_coordinate C Integer
z_coordinate C Integer
Coordinates UOM O String UOM of the XYZ coordinates. This field is not mandatory but if sent, it should be a valid UOM code defined in WMS as a DIMENSION UOM class. Also, if sent, the Location Coordinates Base UOM should be configured on the facility to perform conversion.
tracked_timestamp X DateTime

Time at which the barcode was scanned or XYZ coordinate of the user was captured. Can be sent with or without time zone component.

Example without time zone: "2024-08-07T00:00:00"

Example with time zone: "2024-08-07T00:00:00+05:30"

  • If sent without time zone component, WMS assumes the tracked_timestamp to be in the time zone of the facility in the payload and the tracked_timestamp is used as-is.
  • If sent with time zone component, the time zone is used to convert tracked_timestamp to the facility time zone.

    Note: If sending a time zone component, ensure that the requesting user’s default facility’s time zone is same as the time zone of the facility in the payload, else the conversion may result in undesirable results

    Example 1:

    • User’s default facility time zone: +05:30
    • Time zone of the facility_id passed in the payload: +05:30
    • Tracked_timestamp sent with any time zone is converted appropriately.

    Example 2:

    • User’s default facility time zone: +08:00
    • Time zone of the facility_id passed in the payload: +05:30
    • Tracked_timestamp sent with any time zone is NOT converted appropriately
screen_name X String Any text that identifies the app, device or screen in the external system that was used to capture user's location
equipment_type O String If sent, it can be any text that identifies the equipment the user was operating when the location was captured by the external system.
task_nbr O String If sent, the task nbr has to match task nbr in WMS Task UI
task_type_exec_seq_nbr O Integer Represents the execution seq nbr of WMS task If the external system has this information, it can be sent.

where X = Mandatory; O = Optional; C = Conditional

Request Body Example (JSON)

With location_barcode

{
    "fields": {
        "company_id": 648,
        "facility_id": 722
        "cw_user_id" : 3452,
        "location_barcode": "R010503",
        "tracked_timestamp": "2024-08-07T00:00:00",
        "screen_name": "RFID Receiver 1"
      }
}

With xyz coordinates


{
    "fields": {
        "company_id": 648,
        "facility_id": 722
        "cw_user_id" : 3452,
        "x_coordinate": 3,
        "y_coordinate": 4,
        "z_coordinate": 1,
        "coordinate_uom_code" 'M'
        "tracked_timestamp": "2024-08-07T00:00:00",
        "screen_name": "RFID Receiver 1"
      }
}

With all fields

{
    "fields": {
        "company_id": 648,
        "facility_id": 722
        "cw_user_id" : 3452,
        "x_coordinate": 3,
        "y_coordinate": 4,
        "z_coordinate": 1,
        "coordinate_uom_code" 'M'
        "tracked_timestamp": "2024-08-07T00:00:00",
        "screen_name": "RFID Receiver 1",
        "equipment_type: "PLTJK",
        "task_nbr": "TASK00300102",
        "task_type_exec_seq_nbr": 1    
      }
}

Request Body Example (XML)

<request>
    <fields> 
        <company_id>648</company_id>
        <facility_id>722</facility_id>
        <cw_user_id>3452</cw_user_id>
        <location_barcode>R010503</location_barcode>
        <tracked_timestamp>2024-08-07T00:00:00</tracked_timestamp>
        <screen_name>RFID Receiver 1</screen_name>       
    </fields>
</request> 

Bulk Upload REST API

This API can be used to post single or multiple employee location track records to WFM. The data is posted to the stage view (Employee Location Track Stage tab of Input Interfaces) and the process to move data to the main view (Employee Location Track) is either synchronous or asynchronous depending on the async_flg on the API Header.

Note: This API supports only JSON format. XML is not supported.

URL

POST ..lgfapi/v10/stage/employee_location_track/

Request Body

  • async_flg - true/false; default true
    • When false:
      • Posts data to the Stage tab of Employee Location Track Input Interface and the process to move data to Employee Location Track is triggered immediately after.
      • If all records are processed successfully, a 204 is returned with a response body which indicates that all records have been processed successfully.All the records show up in Employee Location Track view.
      • If one or more records fail validations, a 204 is returned with a response body which indicates the number of records that had errors. Failed records remain in the Stage tab with status marked as “Failed”. Records that go through successful validations show up in the Employee Location Track view.
      Note: It is advisable not to use async_flg = false if you intend to post large volume of records since the calling system may have to wait for considerable time to receive a response from WFM.
    • When true:
      • Posts data to the Stage tab of Employee Location Track Input Interface
      • Returns 201 with a response body which indicates that the request has been received successfully and submitted for further processing.
      • The process to move data to Employee Location Track is triggered ONLY after sending the response to the caller.
  • header
    • origin_system
    • client_env_code
    • parent_company_code
    • entity - "stage_employee_location_track"
    • timestamp
    • facility_code
    • company_code
    • messageid
  • stage_employee_location_track_list - The table below lists the attributes within this parameter:
    Name Required Type Description
    cw_user X String Employee whose location is tracked
    location_barcode C String Barcode of the location defined in WMS locations UI. Either this should be sent OR XYZ Coordinates have to be sent
    x_coordinate C Integer These should be sent if barcode is not sent. Field supports upto 38 digits regardless of decimal position. Maximum decimals is governed by the configuration in the facility for location coordinates, rounded up to decimals allowed. For example, if the decimal setting on location coordinates is 4 and the value sent in the payload is 123.456789, the value will be rounded to 123.4568
    y_coordinate C Integer
    z_coordinate C Integer
    coordinate_uom_code O String UOM of the XYZ coordinates. This field is not mandatory but if sent, it should be a valid UOM code defined in WMS as a DIMENSION UOM class. Also, if sent, the Location Coordinates Base UOM should be configured on the facility to perform conversion.
    tracked_timestamp X DateTime

    Time at which the barcode was scanned or XYZ coordinate of the user was captured. Can be sent with or without time zone component.

    Example without time zone: "2024-08-07T00:00:00"

    Example with time zone: "2024-08-07T00:00:00+05:30"

    • If sent without time zone component, WMS assumes the tracked_timestamp to be in the time zone of the facility in the payload and the tracked_timestamp is used as-is.
    • If sent with time zone component, the time zone is used to convert tracked_timestamp to the facility time zone.
      Note: If sending a time zone component, ensure that the requesting user’s default facility’s time zone is same as the time zone of the facility facility in the payload, else the conversion may result in undesirable results.

      Example 1:

      • User’s default facility time zone: +05:30
      • Time zone of the facility_code passed in the payload: +05:30
      • Tracked_timestamp sent with any time zone is converted appropriately.

      Example 2:

      • User’s default facility time zone: +08:00
      • Time zone of the facility_code passed in the payload: +05:30
      • Tracked_timestamp sent with any time zone is NOT converted appropriately
    screen_name X String Any text that identifies the app, device or screen in the external system that was used to capture user's location
    equipment_type O String If sent, it can be any text that identifies the equipment the user was operating when the location was captured by the external system.
    task_nbr O String If sent, the task nbr has to match task nbr in WMS Task UI
    task_type_exec_seq_nbr O Integer Represents the execution seq nbr of WMS task If the external system has this information, it can be sent.

    where X = Mandatory; O = Optional; C = Conditional

Request Body Example (JSON) - With all fields

{
    "async_flg":false,
    "header": {
		"document_version": "24D",
		"origin_system": "QA",
		"client_env_code": "",
		"parent_company_code": "",
		"entity": "stage_employee_location_track",
		"timestamp": "2024-07-23T12:12:12",
		"facility_code": "QATST01",
		"company_code": "QATSTPC",
		"messageid": 12345
    },
    "stage_employee_location_track_list": [{
        "cw_user": "KKALL01",
        "location_barcode": "R010503",
        "x_coordinate": 0,
        "y_coordinate": 0,
        "z_coordinate": 0,
        "coordinate_uom_code": "",
        "tracked_timestamp": "2024-06-12T19:01:29",
        "screen_name": "emp track app",
        "equipment_type": "",
        "task_nbr": "",
        "task_type_exec_seq_nbr": 0
    }]
}

Request Body Example (JSON) - With required fields

{
    "async_flg":false,
    "header": {
		"document_version": "24D",
		"origin_system": "QA",
		"client_env_code": "",
		"parent_company_code": "",
		"entity": "stage_employee_location_track",
		"timestamp": "2024-07-23T12:12:12",
		"facility_code": "QATST01",
		"company_code": "QATSTPC",
		"messageid": 12345
    },
    "stage_employee_location_track_list": [{
        "cw_user": "KKALL01",
        "location_barcode": "R010503",
        "tracked_timestamp": "2024-06-12T19:01:29",
        "screen_name": "emp track app"
     }]
}