Create a unique identifier in scope
Function: Create a unique identifier in scope
This action generates a completely unique identifier (UUID) and stores it in a new variable within your application's scope. This is useful for creating unique IDs for records, sessions, or any other data that requires a distinct, non-repeating identifier.
Input
- UUID
- Type:
STRING - Default Value:
CREATED_UUID - Description: Enter the name for the new variable that will hold the generated unique identifier. If you leave this field empty, the system will automatically use
CREATED_UUIDas the variable name.
- Type:
Output
- Result
- Type:
STRING - Description: This output provides the name of the variable that was created to store the unique identifier. This will be the name you specified in the input, or
CREATED_UUIDif you used the default.
- Type:
Execution Flow
Real-Life Examples
Here are some practical ways you can use the "Create a unique identifier in scope" action:
-
Generating a Unique Order ID:
- Inputs:
- UUID:
NewOrderID
- UUID:
- Result: A new variable named
NewOrderIDis created in your application's scope, containing a unique identifier (e.g.,a1b2c3d4-e5f6-7890-1234-567890abcdef). The action returnsNewOrderID. You can then use thisNewOrderIDwhen creating a new order record in your database.
- Inputs:
-
Creating a Unique Session Token for a User:
- Inputs:
- UUID:
UserSessionToken
- UUID:
- Result: A new variable named
UserSessionTokenis created, containing a unique identifier (e.g.,f0e9d8c7-b6a5-4321-fedc-ba9876543210). The action returnsUserSessionToken. This token can be used to track a user's session securely.
- Inputs:
-
Using the Default Variable Name for a Temporary ID:
- Inputs:
- UUID: (Leave empty to use default)
- Result: A new variable named
CREATED_UUIDis created, containing a unique identifier (e.g.,1a2b3c4d-5e6f-7g8h-9i0j-klmnopqrstuv). The action returnsCREATED_UUID. This is useful for quick, temporary unique IDs where a specific name isn't critical.
- Inputs: