---
sourceDocument: Australia Asset Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/it-asset-management

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Asset Management

ft:clusterId :

    - itam

bundleId :

    - itam

workflow :

    - Technology


---

# Create a subflow to get user activity

# Create a subflow to get user activity {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

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](https://servicenow-prod.fluidtopics.net/cBYN4VI9vGmBoF2Ti8SIOg "Create a data stream action to get user activity from a SaaS application.").

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 AllFlow DesignerDesigner.
2. Click New and then select Subflow.
3. On the form, fill in the fields.  
   {#create-sublow-get-activity__table_dk4_brb_njb__entry__2}

   | Field | Value |
   |-|-|
   | Name | Name of your choice. For example, <var class="keyword varname">Application</var> Update User Activity, where <var class="keyword varname">Application</var> is the name of the SaaS application you're integrating with. |
   | Application | Software 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 From | All application scopes. |
   | Category | Leave this field empty. |
   | Protection | None. |
   | In-Flow Annotation | Leave this field empty. |
   | Description | Description of your choice. |
   | Run As | User who initiates session. |
   [Table 1. Subflow Properties form]

   {#create-sublow-get-activity__table_dk4_brb_njb}
4. Click Submit.
5. Add an integration profile input and a look back time input.  
   {#create-sublow-get-activity__table_vjm_pqb_njb__entry__4}

   | Label | Name | Type | Mandatory |
   |-|-|-|-|
   | Integration profile | integration_profile | Reference.Integration Profile | Yes |
   | Look back time | look_back_time | Date/Time | Yes |
   [Table 2. Inputs]

   {#create-sublow-get-activity__table_vjm_pqb_njb}
6. In the Actions section, click the plus icon and then click Action to add a new action.
7. 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](https://store.servicenow.com). For a complete list of available spokes, see [IntegrationHub
   available spokes](https://www.servicenow.com/docs/access?context=spokes-list&version=australia&pubname=australia-integrate-applications&ft:locale=en-US). If there's no existing spoke for the SaaS application that you want to integrate with, you can [create a new spoke](https://servicenow-prod.fluidtopics.net/OM9qHdowvLGSLe4q9BC_3A "To set up a custom integration in SaaS License Management, create a spoke to connect with a SaaS application.").
8. Select a data stream action to get user activity.
9. Add the Look back time subflow input as the value to pass to the Look back time input for the data stream action.
10. Define the values to pass for any user authentication inputs for the data stream action.
11. 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.
12. Use values from the Data panel to complete the action.  
    {#create-sublow-get-activity__table_wjf_5gt_sjb__entry__2}

    | Field | Value |
    |-|-|
    | Last activity | Date of most recent activity from the targetObject. |
    | Integration profile | Integration profile input that you created for the subflow. |
    | External user id | User 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 name | Email 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. |
    [Table 3. Update User Activity If Later action]

    {#create-sublow-get-activity__table_wjf_5gt_sjb}
13. 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.
14. 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 LogsSystem LogAll.
    {#create-sublow-get-activity__substeps_tnl_zxq_zjb}
15. After verifying that the subflow is working as expected, click Publish.  
    Tip:  
    You can still edit the subflow after it's published.

*[\>]: and then


