- 07 Feb 2024
- 3 Minutes to read
- DarkLight
Customize case state transitions
- Updated on 07 Feb 2024
- 3 Minutes to read
- DarkLight
Customize the case state change process by assigning a workflow that will execute whenever an analyst initiates a transition to a specific state. The workflow verifies that all requirements for the state transition are met before performing the actual state change.
To implement this, you have to create and publish two workflows:
The example use case demonstrated below gathers user input when an analyst tries to close a case, ensuring that the investigation aligns with the organization’s requirements. This customizes the default modal, prompting the analyst to select a resolution reason when closing a case. By creating the two workflows mentioned above, you can present any questions and messages to the analyst trying to change the case state to Closed.
Tip
A template for this use case is available in our Templates library.
1. Define the behavior upon a manual state change
Implement any logic to check whether the state transition can be performed.
Use the On-demand trigger for the workflow. We recommend that you toggle Conclude form/task with to Next form/task to let the analyst know about the state change outcome (see step 4).
Implement the logic to check whether the requirements for the state change are met. Examples of such logic are:
Permit the state transition only if the case was previously in a specific state. For example, enable the closure of a case only if it was previously in progress.
Authorize the state transition exclusively for specific users. For example, allow only designated users to close a case.
If the requirements are met, use the Change case state step to perform the state transition.
We recommend using the Send Form step to notify the analyst about the state change outcome and provide reasons if the change didn’t occur.
Publish the workflow.
Use case example: Collect user input for state change decision
Use the On-demand trigger for the workflow. To interact with the user by using forms (more information about form utility steps), toggle Conclude form/task with to Next form/task. Add parameters to the trigger to collect user input and have it available in the context of the trigger event.
Based on the collected input, decide on whether to proceed with the requested state change. Use the Change case state step and determine the state to which the case will transition. When changing the case state to Resolved or Closed, a resolution reason must be provided. The example below demonstrates utilizing the user input provided earlier as the resolution reason.
Use the Send Form step to notify the user about the state change outcome and provide reasons if the change didn’t occur.
Publish the workflow.
2. Assign a workflow to a case state transition
The workflow created in the previous section must be mapped to a specific case and a transition to a specific state.
Establish logic to determine how you want to assign a workflow to a state change for a specific case. The example below demonstrates assignment for any new case, but you can assign based on the case characteristics or other cases scenarios.
Use the Assign workflow to state change step. Specify the case ID, the target state for customizing the transition, and the name of the workflow you want to use for the customization. The workflow name is automatically translated into the workflow ID.
Other available steps are: Get assigned workflow for state change and Unassign workflow from state change.Publish the workflow.
Tip
Make sure the state specified in the Assign workflow to state change step matches the state in the Change case state step in the first workflow.