Skip to main content
All CollectionsBuild AutomationsCasesCustomize Torq Case Management
Customize Case State Transitions with Torq Workflows
Customize Case State Transitions with Torq Workflows

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 the case state is updated. This feature is particularly useful for maintaining compliance with organizational protocols during case investigations.

Create and publish the following workflows:

In the example use case below, when an analyst attempts to close a case, they are prompted to provide information about the investigation. By setting up the two workflows mentioned above, you can present questions, evaluate the responses, and decide whether to update the case state to Closed, ensuring compliance with the organization’s requirements.

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

1. Define the Behavior Upon Manual State Changes

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

  1. Set the Workflow Trigger:

    • Use the On-demand trigger, or

    • Use the Torq Interact trigger to collect user input or display messages.

  2. Implement Logic: Determine the conditions under which the state transition can occur. Examples include:

  3. Perform the State Transition: Once the requirements are met, use the Change case state step to execute the transition.

  4. Notify Analysts: We recommend using Torq Interact to inform users of the outcome and provide reasons if the state change was unsuccessful.

  5. Publish the Workflow: Finalize and publish the workflow before moving on to the next step.

Use Case Example: Collecting User Input for State Change Decisions

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

  2. Based on the input collected, decide whether to proceed with the requested state change. Use the Change case state step to 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.

  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 assigned to a specific case and mapped to a particular state transition.

  1. Set Logic for Customizing the State Transition: Define how the workflow will be assigned to specific cases. For instance, you can assign the workflow for all new cases.

  2. Assign the Workflow: Use the Assign Workflow to State Change step. Specify the case ID, the target state for the transition, and the name of the workflow (which is automatically translated to the workflow ID).
    Other available steps are: Get assigned workflow for state change and Unassign workflow from state change.

  3. Publish the Workflow: Publish the workflow to ensure it is active and functioning.

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.

Did this answer your question?