Requisition Items
RequisitionItems, are the individual requested items from on a Requisition.
Schemaβ
RequisitionItemβ
| Name | Type | Description | Example |
|---|---|---|---|
| id | String | Unique RequisitionItem identifier | "clqzdedh90012b24xndju75yu" |
| createdAt | DateTime | When this RequisitionItem was created | "2021-03-24 17:26:46.983Z" |
| updatedAt | DateTime | When this RequisitionItem was updated | "2021-03-24 17:26:46.983Z" |
| allowSubstitution | Boolean? | Whether this item was set to allow a generic substitution, or required the precise item | true |
| createdById | String? | ID of the user who created the requisitionItem | "clqzdedh90012b24xndju75yu" |
| description | String? | Item description | "[Conduit Body] 2", PVC, LB, No Cover/Gasket" |
| lineItemId | ID? | Foreign key to the Item | "clqzdedh90012b24xndju75yu" |
| lineNumber | Int? | Line number in the greater requisition | 1 |
| manufacturerPartNumber | String? | MPN number of requisition item | "BR115" |
| catalogId | ID | Resolved field of the catalogId | "clqzdedh90012b24xndju75yu" |
| notes | String? | Any manually added item notes | "Any color is okay" |
| purchaseOrderId | ID? | ID of the associated Order | "clqzdedh90012b24xndju75yu" |
| quantity | Int? | Quantity requested | 100 |
| rejectionMessage | String? | Manually inputted message for rejection | "This isnβt the right item" |
| rejectionReason | String? | High level rejection reason | "Unapproved Materials" |
| requisitionId | ID | Parent requisition id | "ckrastrq1vlmg0808d9ovytx8" |
| state | RequisitionItemState | See enum below - the current state of this requistiion item | ACKNOWLEDGED |
| unitsOfMeasure | String? | Units of measure (UOM) of the requisition item | "EA" |
| universalProductCode | String? | UPC number of requisition item | "786676362054" |
Enumsβ
RequisitionItemStateβ
| Name | Description |
|---|---|
| ACKNOWLEDGED | RequisitionItem has been 'acknowledged' by the purchasing team |
| REJECTED | RequisitionItem is rejected, and must be re-submitted |
| UNPROCESSED | RequisitionItem hasn't been processed by purchasing yet |
Queriesβ
requisitionItemβ
Reads a single requisition item by ID.
Parametersβ
| Name | Type | Description | Example |
|---|---|---|---|
| id | ID | The requisitionItem ID. | "ckmnpybisiy5x08abky4g2d1f" |
Responseβ
A single RequisitionItem.
Example Queryβ
query {
requisitionItem(
id: "ckmnpybisiy5x08abky4g2d1f"
) {
id
requisitionId
state
}
}
Example Responseβ
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"requisitionId": "ckrastrq1vlmg0808d9ovytx8",
"state": "UNPROCESSED"
}
requisitionItemsβ
Read all requisitionItems from a parent requisition, with pagination and filtering.
Parametersβ
Accepts all standard pagination parameters.
| Name | Type | Description | Example |
|---|---|---|---|
| requisitionId | ID | The requisition ID. | "ckrastrq1vlmg0808d9ovytx8" |
Allowed orderBy fields: createdAt, id, lineNumber, updatedAt.
Allowed filter fields: createdAt, description, id, notes, updatedAt, state.
Responseβ
A list of RequisitionItem.
Example Queryβ
query {
requisitionItems(
requisitionId: "ckrastrq1vlmg0808d9ovytx8"
) {
id
requisitionId
state
}
}
Example Responseβ
[
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"requisitionId": "ckrastrq1vlmg0808d9ovytx8",
"state": "UNPROCESSED"
},
{
"id": "clyonfn7c0225goixmxe30dp3",
"requisitionId": "ckrastrq1vlmg0808d9ovytx8",
"state": "UNPROCESSED"
}
]
Mutationsβ
acknowledgeRequisitionItemβ
Notifies field users that said requisitionItem has been acknowledged. Puts requisitionItem into a 'ACKNOWLEDGED' state.
Parametersβ
| Name | Type | Description | Example |
|---|---|---|---|
| requisitionItemId | ID | The requisitionItem ID. | "ckmnpybisiy5x08abky4g2d1f" |
Responseβ
Returns the RequisitionItem that was just acknowledged.
Example Mutationβ
mutation {
acknowledgeRequisitionItem(
requisitionItemId: "ckmnpybisiy5x08abky4g2d1f"
) {
id
state
}
}
Example Responseβ
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"state": "ACKNOWLEDGED",
}
linkRequisitionItemToOrderItemβ
Link a requisition item to an item that has been ordered. This will maintain data integrity and keep field users aware of the status of their requisition. Additionally, this method:
- updates the parent Requisition state if relevant (ex: all items are ordered, so requisition goes into 'Processed' state)
- links any BOM Items from the requisition item to the order item
Parametersβ
| Name | Type | Description | Example |
|---|---|---|---|
| requisitionItemId | ID | The requisitionItem ID. | "ckmnpybisiy5x08abky4g2d1f" |
| orderItemId | ID | The order's Item ID. | "clkk0egnw0000wewy1ipmezt4" |
Responseβ
Returns the RequisitionItem that was just linked to the order.
Example Mutationβ
mutation {
linkRequisitionItemToOrderItem(
requisitionItemId: "ckmnpybisiy5x08abky4g2d1f",
orderItemId: "clkk0egnw0000wewy1ipmezt4"
) {
id
state
description
purchaseOrderId
lineItemId
}
}
Example Responseβ
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"state": "ORDERED",
"description": "emt",
"purchaseOrderId": "clkiji6xl0004wyxrngfqgqb6",
"lineItemId": "clkk0egnw0000wewy1ipmezt4"
}
rejectRequisitionItemβ
Notifies field users of rejected requisitionItem. Puts requisitionItem into a 'REJECTED' state.
In our web application, the purchase agent selects from a dropdown with these 'reasons':
Reasonsβ
| Name |
|---|
| Missing Information |
| Warehouse Request |
| Unapproved Materials |
| Incorrect Formatting |
| Other |
Parametersβ
| Name | Type | Description | Example |
|---|---|---|---|
| requisitionItemId | ID | The requisitionItem ID. | "ckmnpybisiy5x08abky4g2d1f" |
| reason | String | The 'high level' reason for the rejection. | "Unapproved Materials" |
| message | String? | Details of the rejection. | "Please select EMT requests from the BOM" |
Responseβ
Returns the RequisitionItem that was just rejected.
Example Mutationβ
mutation {
rejectRequisitionItem(
requisitionItemId: "ckmnpybisiy5x08abky4g2d1f",
reason: "Unapproved Materials",
message: "Please select EMT requests from the BOM"
) {
id
rejectedMessage
rejectedReason
state
}
}
Example Responseβ
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"state": "REJECTED",
"rejectedReason": "Unapproved Materials",
"rejectedMessage": "Please select EMT requests from the BOM",
}