Configuration
CraftChat provides a comprehensive settings panel accessible from CraftChat → Settings in your WordPress admin dashboard. This page covers every configurable option, organized by section.
General Settings
General settings control the core identity and authentication of your CraftChat installation.
Site Name
The display name for your site within the CraftChat dashboard and analytics reports. This does not affect the widget that visitors see.
API Key
Your unique API key authenticates every request between your WordPress site and the CraftChat servers. The key is generated when you create your account and can be regenerated from the CraftChat dashboard at any time.
You can set the API key in two ways:
- Admin UI: Paste the key into the CraftChat → Settings → API Key field.
- wp-config.php: Define it as a PHP constant for deployment automation:
// wp-config.php
define('CRAFTCHAT_API_KEY', 'cc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');When the constant is defined in wp-config.php, the admin UI field is locked and displays a masked value. This approach is recommended for version-controlled or multi-environment deployments.
Language
Controls the language of the CraftChat admin interface. Currently supported languages:
- English
- Japanese (日本語)
- Chinese Simplified (简体中文)
- Chinese Traditional (繁體中文)
- Korean (한국어)
- Thai (ภาษาไทย)
The admin language setting is independent of the chatbot response language. The AI responds in whatever language the visitor uses.
Widget Settings
Widget settings control the visual appearance and behavior of the chat widget that appears on your site. All changes are previewed in real time in the admin panel.
Position
Choose where the widget button appears on your pages:
- Bottom Right (default) — The most common placement, suitable for LTR and RTL layouts.
- Bottom Left — Useful when the bottom-right area is occupied by other elements (e.g., a scroll-to-top button).
The widget offset from the edge of the viewport is 20px by default. You can adjust this with custom CSS (see Custom CSSbelow).
Colors
CraftChat provides three color controls for the widget:
| Setting | Default | Description |
|---|---|---|
| Primary Color | #4F46E5 | Widget button background, chat header, and send button. Accepts any valid CSS color value. |
| Text Color | #FFFFFF | Text color on the widget button and chat header. |
| User Message Color | #4F46E5 | Background color of the visitor’s chat bubbles. |
Welcome Message
The welcome message is displayed when a visitor opens the chat panel for the first time. You can customize it per language or leave it blank to skip the greeting.
{
"en": "Hi there! How can I help you today?",
"ja": "こんにちは!何かお手伝いできることはありますか?"
}The AI selects the appropriate welcome message based on the visitor’s browser language. If no match is found, the English message is used as a fallback.
Widget Icon
Choose between the default chat bubble icon, a custom SVG icon, or a custom image URL. Custom icons should be square and at least 48×48 pixels.
Crawl Settings
Crawl settings determine which content CraftChat indexes and how often it refreshes that content.
Pages to Include
By default, CraftChat indexes all published pages and posts. You can customize this behavior with include and exclude rules:
- Include patterns: Specify URL patterns to include. Supports glob syntax. Example:
/products/*,/blog/*. - Exclude patterns: Specify URL patterns to skip. Example:
/cart,/checkout,/my-account/*.
// Example: Include only product and help pages
Include: /products/*, /help/*
Exclude: /cart, /checkout, /my-account/*Exclude rules take precedence over include rules. If a URL matches both an include and an exclude pattern, it is excluded.
Post Types
Select which WordPress post types to crawl. Options include:
post(Blog posts)page(Static pages)product(WooCommerce products, if WooCommerce is active)- Any registered custom post type
Crawl Frequency
CraftChat can automatically re-crawl your content on a schedule:
| Frequency | Description |
|---|---|
| Manual only | No automatic crawls. You trigger re-crawls manually. |
| Daily | Re-crawl once every 24 hours at the time you specify. |
| Weekly | Re-crawl once per week on the day and time you specify. |
| On publish | Automatically crawl a page whenever it is published or updated. This is the recommended setting for most sites. |
Re-Crawl Trigger
In addition to scheduled crawls, you can trigger an immediate re-crawl from the admin panel or via the API:
curl -X POST https://api.craftchat.net/v1/crawl \
-H "Authorization: Bearer cc_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{"full": true}'Setting "full": true forces a complete re-crawl of all pages. Omitting it or setting it to false performs a delta crawl that only processes pages modified since the last crawl.
Advanced Settings
CSP Headers
If your site uses a Content-Security-Policy (CSP) header, you need to add the following directives to allow the CraftChat widget to load and communicate with the API:
Content-Security-Policy:
script-src 'self' https://widget.craftchat.net;
connect-src 'self' https://api.craftchat.net wss://ws.craftchat.net;
style-src 'self' 'unsafe-inline' https://widget.craftchat.net;
img-src 'self' https://cdn.craftchat.net;If you are using a WordPress security plugin (such as Really Simple SSL or Headers Security), add these values through the plugin’s CSP configuration interface rather than editing the .htaccess file directly.
Custom CSS
You can inject custom CSS to override the default widget styles. The CSS is loaded after the widget’s built-in styles, so your rules take precedence.
/* Move the widget button further from the edge */
.craftchat-launcher {
bottom: 30px !important;
right: 30px !important;
}
/* Make the chat panel wider */
.craftchat-panel {
width: 420px !important;
max-height: 700px !important;
}
/* Custom font for chat messages */
.craftchat-message {
font-family: 'Inter', sans-serif !important;
font-size: 14px !important;
}Custom CSS is entered in the CraftChat → Settings → Advanced → Custom CSS textarea. Changes are applied immediately without requiring a re-crawl.
Response Length
Control the maximum length of AI-generated responses:
| Setting | Token Limit | Use Case |
|---|---|---|
| Concise | ~150 tokens | Short, direct answers. Best for FAQ-style queries. |
| Balanced (default) | ~300 tokens | Moderate detail. Good for most use cases. |
| Detailed | ~600 tokens | Thorough explanations. Suitable for technical support. |
One token is roughly three-quarters of a word in English. Longer responses consume more of your monthly response quota.
Data Retention
By default, conversation transcripts are retained for 90 days. You can adjust this in Settings → Advanced → Data Retention:
- 30 days — Minimum retention period.
- 90 days (default) — Recommended for analytics.
- 365 days — Maximum retention period.
- Do not store — Conversations are not saved after the session ends. Analytics features will be limited.