Pypestream's Engagement API empowers developers to build interfaces enabling end-users to engage with a business, and connect common messaging channels such as Slack with the Pypestream Platform. The Engagement API currently supports communication between end-users and microapps.

Functions

The Pypestream Engagement API gives you access to Pypestream engagement capabilities. The API provides these key features:

  • Create a user: Create the end-user that will engage with the business.
  • Start an engagement: Initiate an engagement between an end-user and a microapp.
  • Send messages: Enable end-users to communicate with a microapp.
  • End an engagement: Terminate the engagement between an end-user and a microapp.

Integrating with the Engagement API

At a high level, integrating with the Engagement API involves:

  1. Creating a User
  2. Opening a WebSocket connection
  3. Joining the chat channel chat:{CHAT_ID} in the WebSocket
  4. Starting an Engagement
  5. Waiting until you receive the chat:ready event through the WebSocket
  6. Sending a message
  7. Handle the incoming:msg events received in the WebSocket
  8. Ending the engagement