Skip to content

Status Change Block

The “Status Change” Block is a user management element in Grailgun that allows you to modify the status of bot users during the conversation flow. User statuses help you categorize and control access for different users, implementing features like banning, marking users as active/inactive, or assigning custom status labels.

  • Changing user status during conversation flow
  • Implementing access control and user management
  • Marking users with different state labels
  • Enabling status-based conditional flows
  • Managing user lifecycle states
  • Automating user categorization
  1. Open the bot builder
  2. From the Blocks panel, select “Status Change” (may not be directly visible in sidebar)
  3. The Block will be added to the workspace

Note: Status Change Blocks are typically used in specific flows and may need to be added through advanced builder options or copied from existing flows.

  1. Double-click on the “Status Change” Block in the builder
  2. Select the new status from the dropdown menu
  3. Click “Save” to apply settings

The configuration is straightforward - simply choose which status you want to assign to the user when this Block executes.

The system provides several predefined statuses (the exact list depends on your bot configuration):

  • Active - User is active and can use the bot normally
  • Banned - User is banned and may have restricted access
  • Inactive - User is inactive but not banned
  • [Custom Statuses] - Additional statuses configured for your bot

The Status Change Block has a simple linear flow:

  • IN - Accepts connection from previous Blocks
  • OUT - Continues to next Block after status change

The status is applied immediately when the flow reaches this Block.

Scenario: Automatically ban users who violate rules

Flow:

  1. Response Check: Detect offensive content
    • SUCCESS path:
      • Status Change: Set status to “Banned”
      • Message: “You have been banned for violating our terms.”
      • (Flow ends)

Scenario: Set initial status for new users

Flow:

  1. Start Block
  2. Status Change: Set status to “Active”
  3. Message: “Welcome! Your account is now active.”

Scenario: Upgrade user status after payment

Flow:

  1. Message: “Thank you for your payment!”
  2. Status Change: Set status to “Premium”
  3. Variable Change: Set “subscription_start” = CURRENT_DATE
  4. Message: “You now have access to premium features!”

Scenario: Mark inactive users automatically

Flow:

  1. Condition Check: Last active > 30 days ago?
    • SUCCESS path:
      • Status Change: Set status to “Inactive”
      • Alert: “User marked as inactive”

Scenario: Change status after verification

Flow:

  1. Message: “Please enter verification code”
  2. Variable Change: Set “user_code” = USER_RESPONSE
  3. Condition Check: Is “user_code” correct?
    • SUCCESS path:
      • Status Change: Set status to “Verified”
      • Message: “Verification successful!”
    • ELSE path:
      • Message: “Invalid code, try again”

Scenario: Ban user temporarily, then reactivate

Flow:

  1. Status Change: Set status to “Banned”
  2. Message: “You are temporarily banned for 24 hours”
  3. Await: Wait 24 hours (1440 minutes)
  4. Status Change: Set status to “Active”
  5. Message: “Your ban has been lifted”

Combine Status Change Blocks with Condition Check Blocks to create sophisticated access control:

Example: Premium Feature Gate

Flow:

  1. User clicks “Access Premium Feature”
  2. Condition Check: Is user status = “Premium”?
    • SUCCESS path:
      • Message: “Here’s your premium content…”
    • ELSE path:
      • Message: “This feature requires premium status”
      • Message: “Would you like to upgrade?”

Example: Multi-Level Access

Flow:

  1. Condition Check: User status = “Admin”?
    • SUCCESS: Show admin features
    • ELSE: Continue to next check
  2. Condition Check: User status = “Premium”?
    • SUCCESS: Show premium features
    • ELSE: Continue to next check
  3. Condition Check: User status = “Active”?
    • SUCCESS: Show basic features
    • ELSE: Message “Your account is inactive”
  • Use clear, descriptive status names that reflect their purpose
  • Document what each status means in your bot’s logic
  • Combine with Condition Check Blocks to enforce access control
  • Consider using variables alongside statuses for more granular control
  • Always provide user feedback when status changes
  • Log important status changes using Alert Blocks for monitoring
  • Use Status Change Blocks sparingly - excessive status changes can complicate flow logic
  • Test status changes thoroughly with different user scenarios
  • Consider the impact on existing users when changing status logic

No, each user has one status at a time. When you apply a new status, it replaces the previous one.

The default status depends on your bot configuration. Typically, new users start with a default status like “Active” or “New”.

Custom statuses are configured at the bot level, not within individual flows. Check your bot settings or contact your administrator.

Does status change affect conversation history?

Section titled “Does status change affect conversation history?”

No, changing a user’s status does not affect their conversation history or stored variables. It only affects their current status label and related access controls.

You can set any status at any time, but there’s no automatic “undo” function. Consider storing the previous status in a variable if you need to revert later:

  • Variable Change: Set “previous_status” = COPY_FROM “current_status”
  • Status Change: Set new status
  • (Later, if needed) Use the stored previous status to revert

Use a Condition Check Block with the “Status” condition type to evaluate the user’s current status and create branching logic.

Status changes persist until explicitly changed again by another Status Change Block. They remain across conversation sessions and bot restarts.

Not directly through the bot interface unless you explicitly create a flow that shows them. You can display status information using variables or messages if needed.