call-me-aishmael
Version:
CW Dummy Test
23 lines (18 loc) • 1.04 kB
Markdown
This example shows how to use "actions" as part of your flow in the chat widget. We will be using actions to update a users address.
1. set the `botID`, `XIBMClientID` and `XIBMClientSecret` parameters in [src/index.js](./src/index.js) (see [Getting Started](https://github.com/watson-virtual-agents/chat-widget/blob/master/README.md#getting-started) for further details on this):
```javascript
IBMChat.init({
el: 'ibm_el',
baseURL: 'https://api.ibm.com/virtualagent/run/api/v1/',
botID: '', // replace with Bot ID
XIBMClientID: '', // replace with Client ID
XIBMClientSecret: '' // replace with Client Secret
});
```
2. `npm install`
3. `npm start`
4. open `http://localhost:3030`
Please see [our actions documentation](https://github.com/watson-virtual-agents/chat-widget/blob/master/docs/DOCS.md#actions) for additional information.