Status Change Block
“Status Change” Block
Section titled ““Status Change” Block”What is a “Status Change” Block
Section titled “What is a “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.
Main Functions
Section titled “Main Functions”- 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
Creation and Configuration
Section titled “Creation and Configuration”How to Add a “Status Change” Block
Section titled “How to Add a “Status Change” Block”- Open the bot builder
- From the Blocks panel, select “Status Change” (may not be directly visible in sidebar)
- 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.
Configuring Status Change Parameters
Section titled “Configuring Status Change Parameters”- Double-click on the “Status Change” Block in the builder
- Select the new status from the dropdown menu
- Click “Save” to apply settings
The configuration is straightforward - simply choose which status you want to assign to the user when this Block executes.
Available User Statuses
Section titled “Available User Statuses”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
Connection Points
Section titled “Connection Points”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.
Usage Examples
Section titled “Usage Examples”Ban Abusive Users
Section titled “Ban Abusive Users”Scenario: Automatically ban users who violate rules
Flow:
- Response Check: Detect offensive content
- SUCCESS path:
- Status Change: Set status to “Banned”
- Message: “You have been banned for violating our terms.”
- (Flow ends)
- SUCCESS path:
Mark New Users as Active
Section titled “Mark New Users as Active”Scenario: Set initial status for new users
Flow:
- Start Block
- Status Change: Set status to “Active”
- Message: “Welcome! Your account is now active.”
Trial to Premium Transition
Section titled “Trial to Premium Transition”Scenario: Upgrade user status after payment
Flow:
- Message: “Thank you for your payment!”
- Status Change: Set status to “Premium”
- Variable Change: Set “subscription_start” = CURRENT_DATE
- Message: “You now have access to premium features!”
Inactive User Detection
Section titled “Inactive User Detection”Scenario: Mark inactive users automatically
Flow:
- Condition Check: Last active > 30 days ago?
- SUCCESS path:
- Status Change: Set status to “Inactive”
- Alert: “User marked as inactive”
- SUCCESS path:
User Verification Flow
Section titled “User Verification Flow”Scenario: Change status after verification
Flow:
- Message: “Please enter verification code”
- Variable Change: Set “user_code” = USER_RESPONSE
- Condition Check: Is “user_code” correct?
- SUCCESS path:
- Status Change: Set status to “Verified”
- Message: “Verification successful!”
- ELSE path:
- Message: “Invalid code, try again”
- SUCCESS path:
Temporary Ban with Timer
Section titled “Temporary Ban with Timer”Scenario: Ban user temporarily, then reactivate
Flow:
- Status Change: Set status to “Banned”
- Message: “You are temporarily banned for 24 hours”
- Await: Wait 24 hours (1440 minutes)
- Status Change: Set status to “Active”
- Message: “Your ban has been lifted”
Working with Status-Based Conditions
Section titled “Working with Status-Based Conditions”Combine Status Change Blocks with Condition Check Blocks to create sophisticated access control:
Example: Premium Feature Gate
Flow:
- User clicks “Access Premium Feature”
- 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?”
- SUCCESS path:
Example: Multi-Level Access
Flow:
- Condition Check: User status = “Admin”?
- SUCCESS: Show admin features
- ELSE: Continue to next check
- Condition Check: User status = “Premium”?
- SUCCESS: Show premium features
- ELSE: Continue to next check
- Condition Check: User status = “Active”?
- SUCCESS: Show basic features
- ELSE: Message “Your account is inactive”
Tips and Recommendations
Section titled “Tips and Recommendations”- 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
Frequently Asked Questions
Section titled “Frequently Asked Questions”Can a user have multiple statuses?
Section titled “Can a user have multiple statuses?”No, each user has one status at a time. When you apply a new status, it replaces the previous one.
What is the default user status?
Section titled “What is the default user status?”The default status depends on your bot configuration. Typically, new users start with a default status like “Active” or “New”.
Can I create custom statuses?
Section titled “Can I create custom statuses?”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.
Can I revert to a previous status?
Section titled “Can I revert to a previous status?”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
How do I check a user’s current status?
Section titled “How do I check a user’s current status?”Use a Condition Check Block with the “Status” condition type to evaluate the user’s current status and create branching logic.
Are status changes permanent?
Section titled “Are status changes permanent?”Status changes persist until explicitly changed again by another Status Change Block. They remain across conversation sessions and bot restarts.
Can users see their own status?
Section titled “Can users see their own status?”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.