Chat API: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#seo:
|title=Chat API
|titlemode=append
|keywords=planfix, chat, API
|description=Chat API
}}
== API Overview ==
== API Overview ==
 
APIs let you link any of your chats or similar systems (communication threads with users) to Planfix.
APIs let you link any of your chats or similar systems (communication threads with users) to Planfix
 
 
https://s.pfx.so/pf/CX/FT84xq.png
 
https://s.pfx.so/pf/Vx/v7PSdB.png
 
Integrating Planfix and third-party chats lets you do the following:
Integrating Planfix and third-party chats lets you do the following:
*receive messages from third-party systems in Planfix, as well as data about contacts from these systems, in real-time;
*receive messages from third-party systems in Planfix, as well as data about contacts from these systems, in real-time;
*receive responses from Planfix in third-party systems, in real-time.
*receive responses from Planfix in third-party systems, in real-time.


The integration must be two-way. Planfix sends requests to the third-party system's specified entry points, while the third-party system sends other requests to Planfix's single entry point.
The integration must be two-way. Planfix sends requests to the third-party system's specified entry points, while the third-party system sends other requests to Planfix's single entry point.


The exchange happens over HTTPS. Authorization is done through an address from Planfix or the third-party system, and the authorization key received when setting up the integration.
The exchange happens over HTTPS. Authorization is done through an address from Planfix or the third-party system, and the authorization key received when setting up the integration.
 
==How authorization and communication work==
 
=== HTTPS: ===
 
== How authorization and communication work ==
 
 
'''HTTPS:'''
 
*Calls to Planfix are accepted only over HTTPS. This ensures that the systems can securely communicate over the Internet.
*Calls to Planfix are accepted only over HTTPS. This ensures that the systems can securely communicate over the Internet.
*To keep your data secure, please use HTTPS to receive calls in your system as well.
*To keep your data secure, please use HTTPS to receive calls in your system as well.
 
=== Key (token): ===
 
'''Key (token):'''
 
*In addition, a special key (token) is used to authorize each call to Planfix. You can get it in the integration settings.
*In addition, a special key (token) is used to authorize each call to Planfix. You can get it in the integration settings.
*Please use a key (token) to accept calls in your system as well. Generate a key and enter it in the corresponding field in the integration settings section.
*Please use a key (token) to accept calls in your system as well. Generate a key and enter it in the corresponding field in the integration settings section.
*Keys are created one time, when configuring the integration. You can replace the key on your end as needed and update it in Planfix.
*Keys are created one time when configuring the integration. You can replace the key on your end as needed and update it in Planfix.
 
=== Calls from third-party systems to Planfix: ===
 
'''Calls from third-party systems to Planfix:'''
 
*Calls must be sent to the address specified in the integration settings to receive notifications.
*Calls must be sent to the address specified in the integration settings to receive notifications.
*The special key must always be passed in the body of the request, in the "token" field.
*The special key must always be passed in the body of the request, in the "token" field.
*Requests are passed in the format application/x-www-form-urlencoded
*Requests are passed in the format application/x-www-form-urlencoded
 
=== Calls from Planfix to third-party systems: ===
 
'''Calls from Planfix to third-party systems:'''
 
*Planfix will send all calls to the address specified in the integration settings.
*Planfix will send all calls to the address specified in the integration settings.
*Planfix will pass the key (token) that you specify in your settings in the body of the call.
*Planfix will pass the key (token) that you specify in your settings in the body of the call.
*Requests are passed in the format application/x-www-form-urlencoded
*Requests are passed in the format application/x-www-form-urlencoded
 
=== Responses ===
 
'''Responses'''
 
*Planfix sends all responses to calls from third-party systems in JSON format in the body of the response.
*Planfix sends all responses to calls from third-party systems in JSON format in the body of the response.
*Third-party systems must send all responses to Planfix calls in JSON format in the body of the response.
*Third-party systems must send all responses to Planfix calls in JSON format in the body of the response.
== Connecting in the Planfix interface ==  
== Connecting in the Planfix interface ==  
To connect and configure the integration, navigate to '''Integrations > Chats''' click '''Add chat''' in the section that opens. A window will open for integration settings.
To connect and configure the integration, navigate to '''Integrations > Chats'''.


https://s.pfx.so/pf/D1/Fwfvwl.jpg


https://s.pfx.so/pf/dE/lAnJEs.png
Click on '''Add chat''' in the newly opened area. A window will open for integration settings.


https://s.pfx.so/pf/cs/kVjXks.jpg


This window is where you will find the address for sending requests to Planfix (it's different for every account) and the token. This is also where you will add the data from the chat you are integrating. The providerId is the third-party system's identifier. You can set it to anything. It's needed so you can differentiate calls, should you use this API to link several different chats with overlapping identifiers.
This window is where you will find the address for sending requests to Planfix (it's different for every account) and the token. This is also where you will add the data from the chat you are integrating. The providerId is the third-party system's identifier. You can set it to anything. It's needed so you can differentiate calls, should you use this API to link several different chats with overlapping identifiers.
 
==Additionaly==
*You can employ the quick [[Quick replies|reply feature]] to answer frequently asked questions when communicating with customers.


== Go To ==
== Go To ==
*[[API commands and script examples]]
*[[API commands and script examples]]
*[[API]]
*[[Integrations]]
*[[Integrations]]
*[[Planfix]]

Latest revision as of 13:12, 12 July 2024

API Overview

APIs let you link any of your chats or similar systems (communication threads with users) to Planfix. Integrating Planfix and third-party chats lets you do the following:

  • receive messages from third-party systems in Planfix, as well as data about contacts from these systems, in real-time;
  • receive responses from Planfix in third-party systems, in real-time.

The integration must be two-way. Planfix sends requests to the third-party system's specified entry points, while the third-party system sends other requests to Planfix's single entry point.

The exchange happens over HTTPS. Authorization is done through an address from Planfix or the third-party system, and the authorization key received when setting up the integration.

How authorization and communication work

HTTPS:

  • Calls to Planfix are accepted only over HTTPS. This ensures that the systems can securely communicate over the Internet.
  • To keep your data secure, please use HTTPS to receive calls in your system as well.

Key (token):

  • In addition, a special key (token) is used to authorize each call to Planfix. You can get it in the integration settings.
  • Please use a key (token) to accept calls in your system as well. Generate a key and enter it in the corresponding field in the integration settings section.
  • Keys are created one time when configuring the integration. You can replace the key on your end as needed and update it in Planfix.

Calls from third-party systems to Planfix:

  • Calls must be sent to the address specified in the integration settings to receive notifications.
  • The special key must always be passed in the body of the request, in the "token" field.
  • Requests are passed in the format application/x-www-form-urlencoded

Calls from Planfix to third-party systems:

  • Planfix will send all calls to the address specified in the integration settings.
  • Planfix will pass the key (token) that you specify in your settings in the body of the call.
  • Requests are passed in the format application/x-www-form-urlencoded

Responses

  • Planfix sends all responses to calls from third-party systems in JSON format in the body of the response.
  • Third-party systems must send all responses to Planfix calls in JSON format in the body of the response.

Connecting in the Planfix interface

To connect and configure the integration, navigate to Integrations > Chats.

Fwfvwl.jpg

Click on Add chat in the newly opened area. A window will open for integration settings.

kVjXks.jpg

This window is where you will find the address for sending requests to Planfix (it's different for every account) and the token. This is also where you will add the data from the chat you are integrating. The providerId is the third-party system's identifier. You can set it to anything. It's needed so you can differentiate calls, should you use this API to link several different chats with overlapping identifiers.

Additionaly

  • You can employ the quick reply feature to answer frequently asked questions when communicating with customers.

Go To