and code changes: ``` Add natural language scheduling, docs, wizard, and branding - Add SET SCHEDULE natural language parser supporting patterns like "every hour", "at 9am", "weekdays at 8am", "business
12 KiB
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
Hi, I want to register
Welcome to the enrollment process! Let's get you registered. 📋
First, what is your full name?
Maria Santos Silva
Thank you. What is your birth date? (DD/MM/YYYY)
15/03/1990
What is your email address?
Please provide your Personal ID number (numbers only):
12345678901
Finally, what is your full address?
Rua das Palmeiras, 456 - São Paulo, SP
Please confirm your details:
Name: Maria Santos Silva
Birth Date: 15/03/1990
Email: maria.santos@email.com
Personal ID: 12345678901
Address: Rua das Palmeiras, 456 - São Paulo, SP
Are these details correct? (yes/no)
yes
Thank you! Your enrollment has been successfully submitted. ✅
You will receive a confirmation email shortly.
Dialog 2: User Corrects Information
Please confirm your details:
Name: João Pedro
Birth Date: 20/05/1985
Email: joao@email.com
Personal ID: 98765432100
Address: Av. Brasil, 100 - RJ
Are these details correct? (yes/no)
no
Let's start over with the correct information.
First, what is your full name?
João Pedro Oliveira
Dialog 3: LLM-Assisted Natural Input
When using the LLM, users can provide information naturally:
I'd like to sign up. My name is Carlos Ferreira, born on March 5th 1992, email carlos.f@gmail.com, ID 11122233344, and I live at Rua do Sol, 789 in Brasília
I've captured your information! Let me confirm:
Name: Carlos Ferreira
Birth Date: 05/03/1992
Email: carlos.f@gmail.com
Personal ID: 11122233344
Address: Rua do Sol, 789 - Brasília
Is everything correct? 👆
Perfect! Yes
✅ Registration complete! Welcome aboard, Carlos!
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