Skip to main content
All CollectionsBuild AutomationsCasesCustomize Torq Case Management
Customize State Transitions: Tailor Case State Changes in Torq
Customize State Transitions: Tailor Case State Changes in Torq

Learn how to customize case state transitions, ensuring each transition meets specific requirements before execution.

Updated over a week ago

Enhance your case management process by customizing state transitions with Torq workflows. This guide explains how to assign workflows that automatically verify and execute state transitions, ensuring all procedural requirements are met before a case state is updated. This feature is particularly useful for maintaining compliance with organizational protocols during case investigations.

Create and publish these 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.

A template for this use case is available in our Templates library.

A%20customized%20form%20to%20collect%20user%20input

1. Define the behavior upon a manual state change

Implement any logic to check whether the state transition can be performed.

  1. Use the Torq Interact trigger for the workflow. Set the Interact to Tasks.

  2. 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.

  3. If the requirements are met, use the Change case state step to perform the state transition.

  4. We recommend using Torq Interact to notify the analyst about the state change outcome and provide reasons if the change didn’t occur.

  5. Publish the workflow.

Use case example: Collect user input for state change decision

  1. Use the Torq Interact trigger for the workflow. Add parameters to the trigger to collect user input and have it available in the context of the trigger event.

    On-demand trigger to collect user input
  2. 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 reason for the resolution.

    Change the case state to closed and provide the resolution reason
  3. Use Torq Interact to notify the user about the state change outcome and provide reasons if the change didn’t occur.

  4. 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 transition to a specific state.

  1. 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.

  2. 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.

  3. Publish the workflow.

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.

Assign a workflow for the case transition to the Closed state
Did this answer your question?