Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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.

BMP CLI: Pull

 

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".

Valid options are:

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

 

 

  • No labels