Users
The registration form is a pre-chat form that collects visitor information before they can start chatting. Use it when you need a name, email, or other fields before the first message.
Configure everything under Settings → Users. The help link on Require registration points here.
Require registration
| Option | Behavior |
|---|---|
| Disabled | Visitors can chat without signing up (subject to privacy message and other settings) |
| Registration form | Show sign-up only |
| Login form | Show sign-in only (email + password) |
| Registration and login form | Show both; visitors can switch between create account and sign in |
Password fields appear when Registration and login form is selected (create account flow includes password + repeat password).
Minimal pre-chat form
To ask for only an email or only a name:
- Set Require registration to Registration form.
- Open Registration fields and enable only the fields you need (for example Email with Required, or leave only the default first name field).
- Customize copy under Registration form (title, message, button, success message, terms/privacy links).
First name is always available in the form builder; other fields are optional checkboxes with separate Required toggles.
Registration form copy
Edit Settings → Users → Registration form:
| Field | Purpose |
|---|---|
| Form title | Heading above the form |
| Form message | Intro text |
| Success message | Shown after successful sign-up |
| Button text | Submit label (default: Create account) |
| Terms link / Privacy link | Optional URLs linked from the form |
Optional:
- Include custom fields — adds Custom fields from Settings → Users → Custom fields to the form.
- User details in success message — appends submitted values to the success message.
Login form
When Login form or Registration and login form is active, edit Login form (title and message). Visitors can use Forgot password when login is enabled — see Login link and forgot password.
External registration page
Registration link — instead of the built-in form, redirect visitors to your own URL (for example your site’s sign-up page). The widget still enforces Require registration before chat.
Scheduling and availability
| Setting | Effect |
|---|---|
| Disable registration during office hours | Registration/login only outside office hours |
| Disable registration if agents online | Registration/login only when all agents are offline |
Duplicate email and OTP
If someone tries to register with an email that already exists, Aysali Bot sends a one-time code so they can prove ownership and sign in instead of creating a duplicate account. This can happen even when Email verification is disabled.
Details: OTP email verification.
Auto-login via URL
You can sign visitors in without showing the form:
Login token (query string)
After a user receives a login link email, opening the chat page with the token query parameter logs them in automatically. The token is removed from the browser address bar after use.
Example shape (your host and token value will differ):
https://your-site.example/page-with-chat?token=USER_TOKEN_HERE
Pre-filled user (SB_DEFAULT_USER)
On the page that embeds the chat, define a JavaScript object before the chat script loads to pass profile data for automatic add-user-and-login:
<script>
var SB_DEFAULT_USER = {
first_name: 'Jane',
last_name: 'Doe',
email: '[email protected]',
extra: { phone: ['+1234567890', 'Phone'] }
};
</script>
<!-- then your Aysali Bot embed script -->
If the email or phone already exists, the widget retries without the conflicting field. When SB_DEFAULT_USER includes an email, the pre-chat registration form may be skipped for new visitors.
Other useful query parameters on the chat page include conversation (open a thread), chat=open (open the widget), and rating (post-conversation rating).
Related settings
| Setting | Topic |
|---|---|
| Register all visitors | Creates user records for all visitors vs only when they start a chat |
| Email verification | OTP on new registration — users information |
| Login verification URL | External auth for login — users information |