Enrollment Template
The enrollment template demonstrates how to build a complete data collection workflow that gathers user information step-by-step, validates inputs, confirms details, and saves the data.
Topic: User Registration & Data Collection
This template is perfect for:
- Customer onboarding flows
- Event registrations
- Lead capture forms
- Survey collection
- Application submissions
The Code
REM Enrollment Tool Example
PARAM name AS string LIKE "Abreu Silva"
DESCRIPTION "Required full name of the individual."
PARAM birthday AS date LIKE "23/09/2001"
DESCRIPTION "Required birth date of the individual in DD/MM/YYYY format."
PARAM email AS string LIKE "abreu.silva@example.com"
DESCRIPTION "Required email address for contact purposes."
PARAM personalid AS integer LIKE "12345678900"
DESCRIPTION "Required Personal ID number of the individual (only numbers)."
PARAM address AS string LIKE "Rua das Flores, 123 - SP"
DESCRIPTION "Required full address of the individual."
DESCRIPTION "This is the enrollment process, called when the user wants to enrol."
REM Start enrollment
TALK "Welcome to the enrollment process! Let's get you registered."
TALK "First, what is your full name?"
HEAR name
TALK "Thank you. What is your birth date? (DD/MM/YYYY)"
HEAR birthday
TALK "What is your email address?"
HEAR email
TALK "Please provide your Personal ID number (numbers only):"
HEAR personalid
TALK "Finally, what is your full address?"
HEAR address
REM Validate and confirm
TALK "Please confirm your details:"
TALK "Name: " + name
TALK "Birth Date: " + birthday
TALK "Email: " + email
TALK "Personal ID: " + personalid
TALK "Address: " + address
TALK "Are these details correct? (yes/no)"
HEAR confirmation
IF confirmation = "yes" THEN
SAVE "enrollments.csv", name, birthday, email, personalid, address
TALK "Thank you! Your enrollment has been successfully submitted."
ELSE
TALK "Let's start over with the correct information."
END IF
Sample Dialogs
These conversations show how the enrollment template works in real-world scenarios.
Dialog 1: Successful Enrollment
🤖
Registration Bot
online
Today
Dialog 2: User Corrects Information
🤖
Registration Bot
online
User continues with corrected information...
Dialog 3: LLM-Assisted Natural Input
When using the LLM, users can provide information naturally:
🤖
Smart Registration
online
Keywords Used
| Keyword | Purpose |
|---|---|
PARAM | Define expected input parameters with types and examples |
DESCRIPTION | Provide context for LLM understanding |
TALK | Send messages to the user |
HEAR | Wait for and capture user input |
IF/ELSE | Conditional logic for confirmation |
SAVE | Persist data to CSV file |
How It Works
- Parameter Definition: The
PARAMdeclarations tell the LLM what information to collect - Step-by-Step Collection: Each
HEARcaptures one piece of data - Confirmation Loop: User reviews all data before submission
- Data Persistence:
SAVEstores the validated data
Customization Ideas
Add Validation
HEAR email
IF NOT INSTR(email, "@") THEN
TALK "Please enter a valid email address"
HEAR email
END IF
Add to Database Instead of CSV
INSERT "users", name, birthday, email, personalid, address
Send Confirmation Email
SEND MAIL email, "Welcome!", "Your registration is complete, " + name