Ask AI
Skip to main content

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_UUID as the variable name.

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_UUID if you used the default.

Execution Flow

Real-Life Examples

Here are some practical ways you can use the "Create a unique identifier in scope" action:

  1. Generating a Unique Order ID:

    • Inputs:
      • UUID: NewOrderID
    • Result: A new variable named NewOrderID is created in your application's scope, containing a unique identifier (e.g., a1b2c3d4-e5f6-7890-1234-567890abcdef). The action returns NewOrderID. You can then use this NewOrderID when creating a new order record in your database.
  2. Creating a Unique Session Token for a User:

    • Inputs:
      • UUID: UserSessionToken
    • Result: A new variable named UserSessionToken is created, containing a unique identifier (e.g., f0e9d8c7-b6a5-4321-fedc-ba9876543210). The action returns UserSessionToken. This token can be used to track a user's session securely.
  3. Using the Default Variable Name for a Temporary ID:

    • Inputs:
      • UUID: (Leave empty to use default)
    • Result: A new variable named CREATED_UUID is created, containing a unique identifier (e.g., 1a2b3c4d-5e6f-7g8h-9i0j-klmnopqrstuv). The action returns CREATED_UUID. This is useful for quick, temporary unique IDs where a specific name isn't critical.