Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Create a subflow to reclaim a user

Create a subflow to reclaim a user subscription.

Before you begin

This subflow requires an action to remove a user. For more information, see Create an action to remove a user.

Role required: flow_designer

About this task

Note: For examples of subflows to reclaim a user, see the Jira Reclaim Subscription and Webex Reclaim Subscription subflows.

Procedure

  1. Navigate to All > Flow Designer > Designer.

  2. Click New and then select Subflow.

  3. On the form, fill in the fields.

FieldValue
NameName of your choice. For example, *Application* Reclaim Subscription, where *Application* is the name of the SaaS application you are integrating with.
ApplicationSoftware Asset Management - SaaS License Management Integrations.Note: If you save the subflow in the Software Asset Management - SaaS License Management Integrations application, it's included with your Software Asset Management subscription. If you save the subflow in any other application, you may be charged for ServiceNow® Integration Hub transactions. If you're publishing your custom spoke application on the ServiceNow Store, select your custom app instead.
Accessible FromAll application scopes.
CategoryLeave this field empty.
ProtectionNone.
In-Flow AnnotationLeave this field empty.
DescriptionDescription of your choice.
Run AsUser who initiates session.
  1. Add an integration profile input and a user subscription input.

    LabelNameTypeMandatory
    Integration profileintegration_profileReference.Integration ProfileYes
    User subscriptionuser_subscriptionReference.Software SubscriptionYes
  2. Add an error message output and a status output.

    LabelNameType
    Error messageerror_messageString
    StatusstatusString
  3. In the Actions section, click the plus icon and then click Action to add a new action.

  4. In the list of installed spokes, select the spoke for the SaaS application that you're integrating with.

    Note: To add additional spokes to your list of installed spokes, request them on the ServiceNow Store. For a complete list of available spokes, see IntegrationHub available spokes. If there's no existing spoke for the SaaS application that you want to integrate with, you can create a new spoke.

  5. To remove a user, select an action.

    1. Define the value to pass as the User ID input.

      The value that you use depends on the API that you're working with, but it will generally be the External user ID or User principal name field from the User subscription input for this subflow.

    2. Define the values to pass for any user authentication inputs for the action.

  6. To check if the Remove User action returns an error, add an If flow logic.

  7. Add a child flow logic to assign subflow outputs.

    NameData
    Error messageError message output from the Remove User action
    Statusfailure
  8. Add an Else flow logic at the same level as the If logic for cases when the Remove User action doesn't return an error.

  9. Add a child flow logic to assign subflow outputs.

    NameData
    Statussuccess

    The following image shows a completed example of a subflow to reclaim a user subscription. The example shown is the Webex Reclaim Subscription subflow.

Image omitted: slc-remove-user-flow.png
Example subflow to reclaim a user subscription
  1. To test your subflow, click Test.

    1. View the test results and system logs for details about any errors.

      To view system logs, navigate to System Logs > System Log > All.

    Note: When testing, remember that this subflow deactivates a user. Test this subflow in a sub-production environment. If only a production environment is available, you can create fake users for testing.

  2. After verifying that the subflow is working as expected, click Publish.

    Tip: You can still edit the subflow after it's published.