Skip to content

A sample insurance bot written in Node and backed by DialogFlow

License

Notifications You must be signed in to change notification settings

root-community/node-insurance-sample-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Root Insurance Sample Bot (Node.js)

A sample bot backed by DialogFlow that interacts with the Root Insurance API to issue Term Life policies.

How To Run

  1. Install dependencies using yarn or npm install
  2. Add a .env file in the root directory with the following enviroment variables:
    # HTTP port to listen on (defaults to 3000)
    APP_PORT=3000
    
    # Your Root API key, as generated in your Organization settings
    ROOT_API_KEY=...
    
    # Root API base URL to use (defaults to https://sandbox.root.co.za/v1/insurance)
    ROOT_BASE_URL=https://sandbox.root.co.za/v1/insurance
    
  3. Start the app with npm run dev - this will run the app using nodemon for auto-restart on changes

PS: You'll also likely want to point your DialogFlow Fulfillment to your app using ngrok.

Contributing

If you wish to contribute to this repository, please fork it and send a PR our way.

Some ideas for improvements:

  • Get the user's preferred cover amount (currently hardcoded to 10000000)
  • Get the user's education status (currently hardcoded to undergraduate_degree)
  • Check if the policyholder already exists, and if so, issue the policy for the existing policyholder

Code of Conduct

Root’s developers and our community are expected to abide by the Contributor Covenant Code of Conduct. Play nice.

About

A sample insurance bot written in Node and backed by DialogFlow

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published