App to start a Push flow for a livechat room
- Clone the repository and change directory:
git clone https://github.com/Ilhasoft/RCApps.StartPushLivechat.git
cd RCApps.StartPushLivechat
- Install the required packages:
npm install
- 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
onAdministration > General > Apps > Enable Development Mode
.
Refer to this guide if you need more info.
-
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.
- Start the configured flow on the App's settings for the specified contact and agent that called the command, sending the
-
Supported types:
- Whatsapp:
whatsapp
- The identifier will be the whatsapp number
- Telegram:
telegram
- The identifer will be the telegram id
- Whatsapp:
-
Examples:
/iniciar-conversa whatsapp 558299999999
/iniciar-conversa telegram 123456789 test
Error responses body returned in this pattern:
{
"error": "error details message"
}
- 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.
- Start the configured flow on the App's settings for the specified contact sending the
- 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
- Status:
- Error result:
- Status:
400 Bad-Request
- Missing cookies header
- Invalid agentId on cookies
- Invalid URN.
500 Internal-Server-Error
- Unexpected Error occurs.
- Status: