---
title: Healthcare - CSR Help Desk - Active Directory - User Functions API - Subflow
description: Learn about the Healthcare - CSR Help Desk - Active Directory - User Functions API - Subflow flow, including its purpose, structure, inputs, outputs, and variables.
component: pingone-solutions
page_id: pingone-solutions:healthcare:flow-reference/healthcare-csr-active-directory-user-functions-api-subflow
canonical_url: https://docs.pingidentity.com/pingone-solutions/healthcare/flow-reference/healthcare-csr-active-directory-user-functions-api-subflow.html
revdate: January 1, 2025
section_ids:
  purpose: Purpose
  structure: Structure
  input-schema: Input schema
  output-schema: Output schema
  variables-and-parameters: Variables and parameters
---

# Healthcare - CSR Help Desk - Active Directory - User Functions API - Subflow

The **Healthcare - CSR Help Desk - Active Directory - User Functions API - Subflow** takes account management actions on users.

## Purpose

The **Healthcare - CSR Help Desk - Active Directory - User Functions API - Subflow** accepts a user identifier and an action (enable, disable, or get user account information) as inputs. It finds the user using the identifier, then performs the specified action.

## Structure

This flow is divided into sections using teleport nodes:

* **Identify the CSR action from the input schema.**

  Uses a PingOne node to identify the user, then uses a function node to set flow variables. A function node then branches the flow based on the desired action, and the flow progresses to the portion of the **User Functions** section that corresponds with the desired action.

* **User Functions**

  Performs an action corresponding to the **action** input:

  * If the **action** is **getUserAccountStatus**, the flow uses a PingOne node to retrieve user information, then uses a function node to determine the correct account status button text. The flow then progresses to the **Return Success** section.

  * If the **action** is **disableUser**, the flow uses a PingOne node to disable the user. The flow then progresses to the **Return Success** section.

  * If the **action** is **enableUser**, the flow uses a PingOne node to enable the user. The flow then progresses to the **Return Success** section.

* **Return Success**

  Sends a success JSON response, indicating that the flow completed successfully.

* **Return Error**

  Sends an error JSON response, indicating that the flow completed unsuccessfully.

## Input schema

This flow has the following inputs:

| Input name   | Required | Description                               |
| ------------ | -------- | ----------------------------------------- |
| `action`     | No       | The action to be taken during the flow.   |
| `identifier` | No       | The identifier to be used in user lookup. |

## Output schema

This flow has the following outputs:

| Output name       | Description                                                                |
| ----------------- | -------------------------------------------------------------------------- |
| `p1UserName`      | The user's PingOne user name.                                              |
| `p1Email`         | The email address associated with the user's PingOne account.              |
| `p1emailVerified` | A Boolean indicating whether the user's email address is verified.         |
| `accountStatus`   | The user's PingOne account status.                                         |
| `pwdLastChange`   | The date when the user's password was last changed.                        |
| `buttonLabel`     | The button label that should be displayed for the user's account status.   |
| `buttonValue`     | The action that the button should take based on the user's account status. |
| `responseData`    | An object containing additional error parameters.                          |
| `action`          | The action that was attempted during the flow.                             |
| `identifier`      | The identifier used in user lookup.                                        |

## Variables and parameters

This flow uses the following variable or parameter values:

| Variable name        | Description                                     |
| -------------------- | ----------------------------------------------- |
| `userAccountControl` | The user's account status.                      |
| `pwdLastSet`         | The date when the user's password was last set. |
