Bot "talking directly in chat" vs having an API to do so

I did a test on spinning up a chat bot on demand per message. It will “work” but has a much higher delay than just keeping it open. My idea was to create my entire app serverless, to reduce costs, so only pinging my api would trigger a chat message to occur. It did what I needed to do for my test, but scaling probably wouldn’t go as well as you would hope if you need to send chat messages very often. If you have an extension, there is an API endpoint to send chat messages too as the extension. This will only work if they have it installed, and allowed chat too, so there are more activation steps. I was going to use a combination of both, if they have the extension, use the API as the response time is quicker, and if not, spin up a chat instance.

1 Like