Set a case SLA. This can be used to add and SLA to a case that doesn't have one, or update an existing SLA.
Note that many of the operations are available in dedicated, simplified End Points.
Namespace
goss.CaseManagement.v1.api.sla.setSLA
Worker
serverlibrary
Parameters
Required Properties | Type | Description |
---|---|---|
caseBusinessKey | String <businessKey> | The business key of the case |
duration | String | An ISO8601 duration value (for example P2D for two days). Pass an empty string if setting |
Optional Properties | Type | Description |
datetime | String | An ISO8601 date and time, eg "2027-03-01T13:00:00Z". Used with the SET |
operation | String | Default: NOW. One of: NOW - set the SLA relative to the current time by the CLEAR - clear the SLA INITIAL - reset the SLA to what it was at the start of the workflow ADD - extend the SLA by the SUBTRACT - reduce the SLA by the SET - set the SLA as the provided |
note | String | A note that will be added to the case history |
private | Boolean | Default: false. Set true to log a private note (only visible to case managers) |
userName | String | This user will be recorded as the user adding the note. You must make sure the user exists |
userRole | String | The role of the user logging the note (eg "staff" or "citizen") |
displayName | String | The display name of the user logging the note |
debug | Boolean | Default: false. Set true to return debug information ("notes") in the response message |
Example
See Case Management API for a full example call.
This example sets the SLA to a fixed date.
{
"duration": "",
"caseBusinessKey": "9198-9523-3868-8305",
"operation": "SET",
"datetime": "2027-03-01T13:00:00Z"
}
Responses
Success
This response includes debug notes.
{
"jsonrpc": "2.0",
"id": 189,
"result": {
"success": true,
"errors": [],
"notes": ["Target: 2027-03-01T13:00:00.000Z", "Target update message sent to workflow", "Timer set requested"]
}
}
Error
{
"jsonrpc": "2.0",
"id": 190,
"result": {
"success": false,
"errors": ["Cannot set workflow variable form_CASETARGETDATE"],
"notes": ["Target: 2027-03-01T13:00:00.000Z", "Timer set requested"]
}
}