Introduction

Cloud Functions allow you to create custom interactions that allow users to interact with your data and content, such as product databases, CRM systems, schedules, third party APIs, or any other data source.

Developers create the functions within the Stackchat editor or through their preferred IDE. Once entered or uploaded these functions can be accessed by your bot.

When you first visit a bot's page, you have two options, Start from Scratch and Upload File.

The Cloud Function Page on First Visit

Cloud Function page on first visit.

First time Stackchat developers will likely want to start from scratch. When you click the Start from Scratch button, you will be taken to the Cloud Function editor.

The Cloud Function Editor

The Cloud Function editor on first load.

Here you can directly input the functions you create. The editor also features a dark mode and the ability to download the contents of the editor.

Editor Functions: Dark Mode Toggle and Download Button

1. Dark mode toggle (currently toggled on). 2. Download button.

For developers who want to use their own IDE, they can reference this example on Github.

Once Cloud Functions have been exported from a developer's IDE, they will become visible on the Cloud Functions page. The button above the editor shows the number of functions that have been exported, and you can click that button to see the names of the ones that have been exported.

Functions that have been exported to a bot

These exported functions are now available to your bot.

IDE users can also remove all existing Cloud Functions using the Reset button.

The Reset button clears all functions

Only hit this button if you are very serious about removing exported functions.