Easy Appetizers

Simple appetizers, snacks and home cooking answers

Chili Hub Script: What It Is and How to Use It

· 6 min read · Mains

In this article
  1. Background and Origin
  2. How the Chili Hub Script Works
  3. Choosing a Chili Hub Script for Your Project
  4. Common Problems and How to Fix Them
  5. Comparisons with Other Conversational Platforms
  6. Costs and Billing Structure
  7. Safety, Privacy and Compliance
  8. Alternatives and When to Consider Them
  9. Frequently Asked Questions

A Chili Hub script is a piece of code that runs on the Chili Hub platform to power interactive chatbot or voice‑assistant experiences.

Background and Origin

Chili Hub was launched in the mid‑2010s as a cloud‑based development environment for conversational AI. The service targets marketers, small‑business owners and developers who need a rapid way to prototype, test and deploy chat‑based interfaces on channels such as web widgets, Facebook Messenger, WhatsApp and voice platforms like Amazon Alexa. The platform provides a visual flow builder, a built‑in natural‑language understanding (NLU) engine, and a runtime that executes scripts written in a JavaScript‑like language called “Chili Script”. Over time, the platform has added integrations with CRM systems, payment gateways and analytics suites, making it a full‑stack solution for conversational commerce.

How the Chili Hub Script Works

When a user sends a message to a bot hosted on Chili Hub, the following sequence occurs:

  1. Message receipt: The platform’s gateway captures the inbound payload and normalises it into a standard JSON format.
  2. NLU processing: The text is passed to the built‑in NLU model, which returns intents, entities and confidence scores.
  3. Script execution: The engine loads the relevant Chili Script file (or multiple files if the project is modular) and runs it in a sandboxed Node.js environment.
  4. Response generation: The script can call built‑in functions such as reply(), prompt() or apiCall() to construct a reply, request additional data, or trigger external webhooks.
  5. Delivery: The final response payload is sent back through the same channel gateway to the user’s device.

The sandbox ensures that scripts cannot access the host operating system, protecting both the platform and the developer’s data. Errors are captured and logged in the Chili Hub console, where developers can view stack traces and re‑run test cases.

Choosing a Chili Hub Script for Your Project

Because Chili Hub supports both visual flow design and raw script editing, you can select the approach that matches your skill set and project complexity. Consider the following factors when deciding which script style to adopt:

  • Skill level: Beginners often start with the drag‑and‑drop flow builder, which automatically generates Chili Script behind the scenes. Experienced developers may prefer writing scripts directly for finer control.
  • Project size: Small FAQ bots can be built with a single script file. Larger e‑commerce assistants typically split logic into modules (e.g., catalog.js, checkout.js).
  • Integration needs: If you need to call external APIs, a handwritten script gives you explicit fetch() calls and error handling.
  • Maintenance: Modular scripts are easier to version‑control with Git and to test with unit frameworks like Jest.

Most teams start with the visual editor to validate the conversational flow, then export the generated script for code review and long‑term maintenance.

Common Problems and How to Fix Them

Even with Chili Hub’s safeguards, developers encounter recurring issues. Below are the most frequent problems and practical solutions.

  • Intent mis‑classification: If the NLU repeatedly maps user input to the wrong intent, retrain the model by adding more example utterances in the “Training Data” tab. Make sure each intent has at least 10 diverse examples.
  • Script timeout: The runtime enforces a 5‑second execution limit per turn. Long‑running API calls should be moved to asynchronous background jobs using Chili Hub’s scheduleTask() function.
  • Missing environment variables: Secrets such as API keys are stored in the “Environment” section of the project. Reference them in the script with process.env.MY_KEY. Forgetting to define a variable will cause a runtime error.
  • Channel‑specific formatting errors: Some platforms (e.g., SMS) do not support rich media. Use the channel.isSMS() helper to conditionally strip images or buttons.
  • Version conflicts: When multiple developers edit the same script file, merge conflicts appear in Git. Adopt a branch‑per‑feature workflow and run the built‑in linting tool before merging.

Comparisons with Other Conversational Platforms

Chili Hub is often evaluated against competitors such as Dialogflow, Microsoft Bot Framework and Rasa. The table below summarises key differences.

FeatureChili HubDialogflowMicrosoft Bot FrameworkRasa
Hosting modelFully managed SaaS with sandboxed script runtimeManaged + optional self‑hostedHybrid (Azure Bot Service or self‑hosted)Self‑hosted only
Primary languageChili Script (JavaScript‑compatible)Dialogflow CX/ES (JSON, webhook)C# / Node.js SDKsPython
Built‑in NLUCustom model with intent/entity trainingGoogle’s pre‑trained NLULUIS integrationRasa NLU (open source)
Visual flow editorYes, drag‑and‑drop canvasLimited flow builderBot Framework ComposerNone (code‑first)
Pricing modelTiered subscription based on monthly active usersPay‑as‑you‑go for requestsAzure consumption pricingFree (open source) + infrastructure cost

Choose Chili Hub if you prefer an all‑in‑one hosted environment with a gentle learning curve, especially when the target audience spans multiple messaging channels.

Costs and Billing Structure

Chili Hub offers three primary subscription tiers:

  • Starter: Up to 1,000 monthly active users (MAU), basic analytics, and email support.
  • Growth: 1,001–10,000 MAU, advanced analytics, webhook integrations, and priority chat support.
  • Enterprise: Unlimited MAU, dedicated account manager, SLA guarantees, and custom security certifications.

All tiers include a fixed number of script executions per month; excess usage is billed at a per‑thousand‑request rate. There are no hidden fees for storage or data transfer, but optional add‑ons—such as a premium NLU model or multi‑language support—incur additional monthly charges. The platform provides a cost‑estimator calculator that lets you input expected MAU and API call volume to forecast the monthly bill.

Safety, Privacy and Compliance

Because conversational bots often handle personal data, Chili Hub incorporates several safeguards:

  • Data encryption: All inbound and outbound traffic uses TLS 1.2 or higher. Stored data at rest is encrypted with AES‑256.
  • GDPR and CCPA compliance: The platform offers built‑in data‑subject request (DSR) tools that allow you to export or delete a user’s conversation history on demand.
  • Sandboxed execution: Scripts run in a container with no network access beyond explicitly allowed outbound URLs. This prevents accidental data leakage.
  • Audit logging: Every change to a script, environment variable or NLU model is logged with a timestamp and user identifier, supporting internal audits.

Developers must still follow best practices, such as never logging raw credit‑card numbers and always validating user input before passing it to external services.

Alternatives and When to Consider Them

If Chili Hub does not meet a specific requirement, the following alternatives may be more suitable:

  1. Dialogflow CX: Ideal when you need deep integration with Google Cloud services and want a highly scalable NLU with pre‑trained models.
  2. Microsoft Bot Framework + Azure Bot Service: Best for enterprises already invested in the Microsoft ecosystem and requiring extensive Azure DevOps pipelines.
  3. Rasa Open Source: Fits projects that demand full control over data, on‑premise deployment, or custom machine‑learning pipelines.
  4. Botpress: A low‑code, open‑source platform that offers a visual flow editor similar to Chili Hub but runs on your own servers.

Switching to an alternative makes sense if you need on‑premise hosting for regulatory reasons, require a programming language other than JavaScript, or have a development team comfortable with full‑stack customisation.

Frequently Asked Questions

What programming language does a Chili Hub script use?

Chili Hub scripts are written in a JavaScript‑compatible language called Chili Script. It supports standard ES6 syntax, async/await, and includes platform‑specific helper functions for replying, prompting and making HTTP requests.

Can I test a Chili Hub script locally before deploying?

Yes. Chili Hub provides a CLI tool that mirrors the cloud runtime, allowing you to run scripts on your workstation, step through code with a debugger, and simulate inbound messages.

Is there a free tier for experimenting with Chili Hub?

Chili Hub offers a free Starter tier that includes up to 1,000 monthly active users and limited script executions, which is sufficient for prototyping and small‑scale pilots.

How does Chili Hub handle user data privacy?

All data is encrypted in transit and at rest. The platform supplies GDPR‑compliant tools for exporting or deleting a user’s conversation logs, and it logs every data‑access event for audit purposes.

What happens if my script exceeds the 5‑second execution limit?

The runtime aborts the request and returns a timeout error to the calling channel. To avoid this, move long‑running tasks to background jobs using scheduleTask() or split the logic into smaller, asynchronous steps.

Can I integrate third‑party APIs like Stripe or Salesforce?

Yes. Using the built‑in apiCall() helper, you can make authenticated HTTP requests to any external service. Store credentials in the project’s environment variables to keep them out of source code.