Batch Change
Represents a batch group that is created, changed, or deleted.
Event Name
BatchChanged
Supported Events
The supported batch group change events are as follows:
- Mixing Station Changed
- All Mixing Stations Changed
- Created
- Tag Added
- Tag Removed
- Settings Changed
- Name Changed
- Equipment Changed
- Container Changed
- Actual Changed
- Delivery Status Changed
- Note Added
- Note Removed
- Batch Added
- Batch Removed
- Deleted
Payload
Within an event, there are multiple pieces of information sent as outlined in the table below.
Key | Type | Description |
---|---|---|
kind | string | The kind represents the type of event being registered. This includes the item which is being acted upon as well as the event being registered. |
id | guid | The reference id of the object that has changed. |
[varies per event type] | [varies per event type] | The data that is changing for the given event type. It can be a key value string or a complex object. It also could be multiple it items. |
metadata | metadata object | Information regarding the initiator of the event. This includes the: version of the object, dateTime it was changed, user of whom performed the change, and the organizationId upon which the change was performed. |
Example Payloads
Some example payloads are shown below.
Mixing Station Changed
{
"kind": "AgSync.Drive.Core.Batches.BatchGroupEvent+BatchMixingStationChanged",
"id": "17d0e4fa-f57f-4a96-81e5-69655ac13efd",
"batchId": "1d3be61f-ec1e-a4cb-7f91-e4dd4e61d2cd",
"metadata": {
"version": 1,
"dateTime": "2023-04-17T17:16:03.5718691Z",
"user": {
"id": 1,
"name": "System"
},
"organizationId": 984,
"reason": null
}
}
Note Added
{
"kind": "AgSync.Drive.Core.Batches.BatchGroupEvent+NoteAdded",
"id": "2eb1ca47-cf2d-4e84-99e1-10b8e4114dbf",
"note": {
"id": "07a7cf97-4c33-4d4d-88dd-fcc21405857c",
"content": "this is a batch note",
"type": "string",
"user": "",
"observedDateTime": "2023-04-17T20:04:55.2299251+00:00"
},
"metadata": {
"version": 2,
"dateTime": "2023-04-17T20:04:55.2920894Z",
"user": {
"id": 1,
"name": "System"
},
"organizationId": 984,
"reason": null
}
}