Find user by userId
Function: Find User by User ID
This function allows you to search for a specific user within your application by providing their unique User ID. If a user with that ID is found, their details will be made available for use in subsequent steps of your workflow.
Input
- User ID (STRING): The unique identifier for the user you are trying to find. This is a required input.
Output
- Found User (USER): If a user is successfully found, their complete profile details (such as User ID, First Name, Last Name, and Email) will be stored in a variable. You will specify the name of this variable when configuring this action. If no user is found, this variable will remain empty.
Execution Flow
Real-Life Examples
Here are some examples of how you can use the "Find User by User ID" function:
Example 1: Displaying User Profile on a Page
- Scenario: You have a page where an administrator can view a user's profile by entering their User ID.
- Inputs:
- User ID:
USR-001234(This value would typically come from an input field on your page.)
- User ID:
- Result: The system searches for the user with ID
USR-001234. If found, all details of this user (e.g., first name "Alice", last name "Smith", email "alice.smith@example.com") are stored in a variable namedFoundUserProfile. You can then display these details on the page.
Example 2: Sending a Personalized Email
- Scenario: After a customer completes an order, you want to find their user record to retrieve their email address and send a personalized confirmation.
- Inputs:
- User ID:
CUST-98765(This value would come from the completed order's customer information.)
- User ID:
- Result: The system finds the user
CUST-98765. Their email address (e.g., "customer@email.com") and first name are stored in a variable namedCustomerDetails. You can then use these details to send a personalized order confirmation email.
Example 3: Updating User Permissions
- Scenario: An admin needs to update the permissions for a specific user. They provide the user's ID, and you need to retrieve the user's current information before making changes.
- Inputs:
- User ID:
EMP-54321(This value is provided by the admin.)
- User ID:
- Result: The system locates the user
EMP-54321. Their current roles and permissions are stored in a variable calledUserToModify. This allows the admin to see the existing permissions and then apply new ones.