Create a subflow to add a list of users to the Software Subscription table.

Before you begin

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

Role required: flow_designer or admin

About this task

Note: For examples of subflows to get users, see the Jira Download Subscriptions and Webex Download Subscriptions subflows.

Procedure

  1. Navigate to All > Flow Designer > Designer.
  2. Select New and then select Subflow.
  3. On the form, fill in the fields.
  4. Select Submit.
  5. Add an integration profile input.
    Table 2. Inputs
    Label Name Type Required
    Integration profile integration_profile Reference.Integration Profile Yes
  6. In the Actions section, select the plus icon and then select 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. 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.
  8. Select a data stream action to get users.
  9. Define the values to pass for any user authentication inputs for the data stream action.

    The data stream action might return users that you don't want to include in your list of user subscriptions. If you perform filtering to exclude some users, add an If flow logic as a child of the get users data stream action.

    The amount of filtering required, if any, depends on the application you're integrating with. For example, if the user targetObject has an active property, you could add a condition to check that the value is true to confirm that the subflow doesn't download deactivated users. An example of filtering used by the Jira Download Subscriptions subflow is that the account type can’t be app to help prevent the subflow from returning accounts that aren’t actual users.

    Add conditions to the If flow logic for any required filtering.
    • If you're using an If flow logic to filter users, add the Upsert user subscription using subscription identifier action from the Software Asset Management spoke as a child of the flow logic.
    • If you're not filtering users, add the Upsert user subscription using subscription identifier action as a child of the get users data stream action. This action adds the SaaS application user subscription to the Software Subscription table [samp_sw_subscription]. If the subscription is already in the table, the action updates the subscription record.
  10. Fill in the inputs that are applicable to your integration.

    Use values from the data panel to fill in the action inputs. Your ask to the SaaS API might not return data for all the inputs.

  11. To test your subflow, select 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: The data stream action to get users should retrieve multiple pages of users successfully. Don't write to the Software Subscriptions [samp_sw_subscription] table until you verify that the data stream action retrieves all users. To verify, you can make a subflow that consumes the data stream and log the results.
  12. After verifying that the subflow is working as expected, select Publish.
    Tip: You can still edit the subflow after it's published.

Configure an identifier

Configure an identifier if it doesn't exist to identify an integration.

Before you begin

Role required: sam_admin

Procedure

  1. Create a custom product when your product doesn't exist in the Software Product [samp_sw_product] table.
    1. Select New.
    2. On the form, fill in the fields.
    3. Select Submit.
  2. Create a custom discovery map by creating a custom entitlement definition from the Discovery maps [samp_custom_sw_entitlement_definition] table.
    1. Select New.
    2. On the form, fill in the fields.
    3. Select Submit.
  3. Create a custom subscription product definition by creating a custom entitlement definition from the Custom Subscription Product Definitions [samp_sw_custom_subscription_product_definition] table.
    1. Select New.
    2. On the form, fill in the fields.
    3. Select Submit.