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

Create a subflow to get user activity

Create a subflow to update the Software Subscription table with each user's most recent activity in the SaaS application.

Before you begin

This subflow requires a data stream action to get user activity. For more information, see Create a data stream action to get user activity.

Role required: flow_designer

About this task

Note: For examples of subflows to get user activity, see the Jira Update User Activity and Webex Update User Activity 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* Update User Activity, where *Application* is the name of the SaaS application you’re integrating with.
ApplicationSoftware Asset Management - SaaS License Management Note: If you save the subflow in the Software Asset Management - SaaS License Management 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. Click Submit.

  2. Add an integration profile input and a look back time input.

    LabelNameTypeMandatory
    Integration profileintegration_profileReference.Integration ProfileYes
    Look back timelook_back_timeDate/TimeYes
  3. In the Actions section, click the plus icon and then click Action to add a new action.

  4. Select the spoke for the SaaS application that you want to integrate with from the list of installed spokes.

    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. Select a data stream action to get user activity.

  6. Add the Look back time subflow input as the value to pass to the Look back time input for the data stream action.

  7. Define the values to pass for any user authentication inputs for the data stream action.

  8. Add the Update User Activity If Later Using User action from the Software Asset Management spoke as a child of the get user activity data stream action.

  9. Use values from the Data panel to complete the action.

    FieldValue
    Last activityDate of most recent activity from the targetObject.
    Integration profileIntegration profile input that you created for the subflow.
    External user idUser id or account id from the user targetObject. This id is generally a numeric and non human-readable value. This value must be unique.
    User principal nameEmail address from the user targetObject. If an email address isn’t available, use another value such as user name plus user id. This value should be human readable.
  10. If you want to use more than one data stream action to get multiple types of user activity, repeat steps 6 through 12 to add each data stream action to the subflow.

  11. Click Test to test your subflow.

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

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

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

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