An interaction is a file that contains your server side code.
Before You Start:
Before you run the Create Interaction command, you will first need to ensure you've done a "pull" request at least once. This will create the directory structure you need on your local machine.
Directory Structure Overview
Once you have pulled your project down, you will notice a structure will have been created within your working directory.
The folder named "interactions" will contain all of your interactions. Each interaction is saved within its own folder, and within these folders are two files - a JSON configuration file (which you generally don't need to modify), and a PHP file for your server side code. New files can be created using the create interaction command.
Create a New Interaction
To create a new interaction, you can run the command:
bm bmp create interaction <interaction name>
Keep in mind the interaction name is used in the URL to access the script, so make sure you use only alphanumeric characters, and no spaces.
This will create the folder and files locally.
Additional Options
--type
The "type" option will allow you to change the type of interaction you create. If you leave this out, it will default to "madl".
Option | Description |
---|---|
madl | "madl" interactions will allow you to run PHP code. (default) |
message | "message" interactions will allow you to run HTML and Javascript content, however in most cases you will probably prefer to use the Client CLI |
bm bmp create interaction <interaction name> --type madl
--remote
As well as creating your new interaction locally, the --remote option will also instantly create this new interaction within your answerSpace.
bm bmp create interaction <interaction name> --remote
Next Steps
Deploy