Skip to content

Ilhasoft/RCApps.StartPushLivechat

Repository files navigation

StartPushLivechat

App to start a Push flow for a livechat room

Installation

Prerequisites

  1. Clone the repository and change directory:
    git clone https://github.com/Ilhasoft/RCApps.StartPushLivechat.git
    cd RCApps.StartPushLivechat
  1. Install the required packages:
    npm install
  1. Deploy the App to an specific Rocket.Chat instance:
    rc-apps deploy --url <your-rocket-url> --username <your-admin-username> --password <your-admin-password>
  • If deploying to an specific Rocket.Chat instance, make sure to enable Development Mode on Administration > General > Apps > Enable Development Mode.

Refer to this guide if you need more info.

Command Reference

/iniciar-conversa {type} {identifier} {extra}

  • Description:

    • Start the configured flow on the App's settings for the specified contact and agent that called the command, sending the extra as a flow parameter.
      • extra field must be a single word.
  • Supported types:

    • Whatsapp: whatsapp
      • The identifier will be the whatsapp number
    • Telegram: telegram
      • The identifer will be the telegram id
  • Examples:

    • /iniciar-conversa whatsapp 558299999999
    • /iniciar-conversa telegram 123456789 test

Enpoint Reference

Error responses body returned in this pattern:

{
    "error": "error details message"
}

GET /start-flow

  • Description:
    • Start the configured flow on the App's settings for the specified contact sending the extra as a flow parameter, and agent then redirects to the Rocket.Chat application.
  • Query Parameters:
    • contactUrn: The contact URN that is registered on Push.
    • extra: The extra data that will be sent as flow parameter on flow starts.
  • Success result:
    • Status: 307 Temporary-Redirect
  • Error result:
    • Status:
      • 400 Bad-Request
        • Missing cookies header
        • Invalid agentId on cookies
        • Invalid URN.
      • 500 Internal-Server-Error
        • Unexpected Error occurs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published