Service Request *************** A service request represents a pick/put/other service request in the system and keeps track of it's life cycle. Service Request Object ====================== .. mermaid:: graph TD A[serviceRequest] --> B[expectations] A --> C[actuals] B --> D[container] C --> D D --> E[Stock Unit/Order line Item] .. gm:data:: serviceRequest **Attributes:** .. gm:data:: externalServiceRequestId *optional string* This is an external service request id that can be used to track this service request. Even if this is not provided, there is an internal unique id of each service request. This id must be unique across service request type. .. gm:data:: id *integer* An auto-generated unique internal id for this service request. .. gm:data:: type *string* This denotes the type of the service request. The service request's handling is based on it's type. For example, ``PICK``, ``PUT``. .. gm:data:: attributes *optional dict* This contains options key-value attributes that behave as the metadata of the service request. .. gm:data:: expectations *dict* This object denotes what is expected from the service request. The internal format of this can be different for different types of service requests. This object is of the form: ``{ "containers": [`` :gm:data:`container` ``]}``. .. gm:data:: actuals *dict* This object denotes the outcome of the service request. This gets updated real time as the service request is going through it's life cycle. This object is of the form: ``{ "containers": [`` :gm:data:`container` ``]}``. .. gm:data:: status *string* This is a coarse-grained status of the service request in it's life cycle. Please see :ref:`Service Request Statuses` for details. .. gm:data:: state *string* This is the fine-grained status of the service request in it's life cycle. Possible states can be different for different types of service request. Please see :ref:`Service Request Statuses` for details. .. gm:data:: serviceRequests *list* This is a list of child :gm:data:`serviceRequest` objects under this service request. In case there are no child service requests, this list should be empty. .. gm:data:: container This is an object which holds details of expectations or actuals in a service request. This is a nestable object, i.e, containers can have containers inside them. **Attributes** .. gm:data:: products *list* This denotes a list of products. The object representing a product might be different for different type of service requests, and different in expectations and actuals. .. gm:data:: type *string, default* ``VIRTUAL`` This denotes the type of the container and tells if the inventory coming in is coming inside an inventory carrier. * ``MARKED`` - barcoded inventory carrier * ``UNMARKED`` - non-barcoded inventory carrier. * ``VIRTUAL`` - no inventory carrier. .. gm:data:: state *string* This denotes the state of this container. Mostly used in actuals to denote the state of part of the execution of the service request. .. gm:data:: containerAttributes *dict* This holds optional metadata related to the container as key-value pairs. Service Request Statuses ======================== +---------------+-----------------------+----------+ |Service Request|State |Status | |Type | | | +===============+=======================+==========+ |PICK |created |CREATED | + +-----------------------+----------+ | |fulfillable |PROCESSING| + +-----------------------+ + | |cancellation_locked | | + +-----------------------+ + | |pick_started | | + +-----------------------+----------+ | |complete |PROCESSED | + +-----------------------+----------+ | |not_fulfillable |FAILED | + +-----------------------+----------+ | |cancelled |CANCELLED | + +-----------------------+ + | |abandoned | | + +-----------------------+----------+ | |temporary_unfulfillable|WAITING | +---------------+-----------------------+----------+ |PUT |created |CREATED | + +-----------------------+----------+ | |stage_requested |PROCESSING| + +-----------------------+ + | |staged | | + +-----------------------+----------+ | |complete |PROCESSED | + +-----------------------+ + | |released | | + +-----------------------+----------+ | |stage_cancel |CREATED | + +-----------------------+----------+ | |cancelled |CANCELLED | +---------------+-----------------------+----------+