Webex bot for interfacing with Avalara's communications tax engine API.
This application is designed to provide tax estimation capabilities by interfacing with the Avalara communications tax engine API. The bot leverages the Fastify web framework and the Webex SDK to send out Adaptive Cards and return results in various formats such as tabular, CSV, and JSON.
The Avalara Tax Bot provides an efficient way to estimate communication taxes by integrating with Avalara's API. It uses Fastify for the web server for command execution, sending results back to users via Adaptive Cards on Webex via the JS SDK. The results can be formatted in various ways including tabular, CSV, and JSON, making it versatile for different use cases.
These instructions assume that you have:
- Administrator access to an Org's Avalara Tax account and ability to create Webex Bot.
- Docker installed and running on a Windows (via WSL2), macOS, or Linux machine.
Open a new terminal window and follow the instructions below to set up the project locally for development/demo.
-
Clone this repository and change directory:
git clone https://github.com/wxsd-sales/avalara-tax-bot && cd avalara-tax-bot
-
Copy
.env.example
file as.env
:cp .env.example .env
-
Review and follow the Creating a Webex Bot guide. Take note of your Bot ID and Bot access token. Assign these values to the
WEBEX_BOT_EMAIL
,WEBEX_BOT_ID
andWEBEX_BOT_TOKEN
environment variables within the.env
file respectively. -
Set the Avalara API credentials in the
.env
file:AVALARA_USERNAME=<your-avalara-username> AVALARA_PASSWORD=<your-avalara-password> AVALARA_CLIENT_ID=<your-avalara-client-id> AVALARA_CLIENT_PROFILE_ID=<your-avalara-client-profile-id>
-
Set other environment variables as needed in the
.env
file. -
Start the application using:
docker-compose up
Lastly, send any message to the bot you just created to get a resppnse. You can restrict who can use the bot by setting the value for WEBEX_PERSON_EMAIL_REGEX_BASE64
in .env
file.
A demo is not available at this time.
Everything included in this repository is for demo and Proof of Concept (PoC) purposes only. Use of the PoC is solely at your own risk. This project may contain links to external content, which we do not warrant, endorse, or assume liability for. This project is for Cisco Webex use-case, but is not official Cisco Webex branded project.
Please reach out to the WXSD team at wxsd@external.cisco.com or contact me on Webex (ashessin@cisco.com).