-
Notifications
You must be signed in to change notification settings - Fork 0
Reference Jobs
The Workgrid Jobs API is the API that's used to manage the delivery and removal of Smart Notifications in Workgrid. Jobs that are submitted to Workgrid have a lifecycle as shown below:

| Lifecycle State | Description |
|---|---|
| Created | This is the first state for a job immediately after a request is received. Workgrid has not started processing the request yet. |
| Processing | Workgrid has started to execute the job. For example, with a request to create smart notifications, Workgrid is actively delivering notifications to users. |
| Completed | Workgrid has finished performing the work. For example, with a request to create smart notifications, Workgrid has completed delivering notifications to users. |
| Error | Workgrid was not able to successfully complete the job, though it may have been partially successful when attempting delivering notifications to users. |
In the context of Smart Notifications you will submit a job to either create or delete Smart Notifications. Every job that is created has a jobId that you can use to invoke the GET Job method in our API to retrieve the current status.
This API processes jobs asynchronously which allows you to treat Workgrid as a side-effect in a 'fire and forget' model. One of the key features that enable a 'fire and forget' model is a correlation identifier. You can provide a correlationId with every job request that represents something meaningful from your source system. Most often this is the transaction identifier from your source system. Multiple job requests to Workgrid for the same correlationId will be processed in the order they are received. Using correlationId means you do not have to maintain Workgrid state because Workgrid does that on your hehalf.
For more information on how to create and manage jobs, please see our Jobs API reference.