Home > Integration API (legacy XML)
Categories: REST API
(Last Updated On: August 5, 2021)
About This Article
The purpose of this article is to provide a comprehensive overview of the Integration API .
Have a custom-built integration or third-party application you want chat data sent to? No Problem!
The SnapEngage API allows developers to easily interface SnapEngage with other applications, getting all the data you gather sent to the place you want to keep it. This transaction provides detailed information pertaining to the request and allows developers to recreate the request in the destination system.
SnapEngage can automatically POST events to an external URL when new requests are received for both offline and live chats.
Activate the API
- In the SnapEngage widget configuration, under the “Integrations” tab.
- Select the “Open API” icon.
- Enter the URL of where you want to receive the POST message when a new offline request or live chat is processed by SnapEngage. In the sections below, you can elect to have the transcripts sent via email to a destination of your choice.
- Once you are done making changes, just make sure to click the “Save” button at the very bottom of the page.
At this time, the event details will be ready to be to parsed out and into your system.
Event API details
When the API is activated and a new support request is received, SnapEngage will automatically send a POST transaction to the URL specified in the API configuration. The transaction provides details about the support request in an XML format (legacy) or JSON.
POST event details in XML:
http://www.snapengage.com/viewcase?c=8b7c3b3b-f5d7-4e58-96d8 http://www.snapengage.com/snapabug/ServiceImage?c=8b7c3b3b-f5d7-4e58-96d8 2010-10-18T01:48:18.623Z http://www.snapengage.com/demo/postapi.html> 22.214.171.124 Chrome (6.0.472.63) Microsoft Windows 7 US United States CO 39.914700 -105.080902 2
Flash 10.0.45 Java 1.6 [email protected] Mon Oct 18 01:48:27 UTC 2010 test Hello, Mon Oct 18 01:48:32 UTC 2010 visitor Hi, Mon Oct 18 01:48:41 UTC 2010 visitor This is a test. [email protected] Mon Oct 18 01:48:49 UTC 2010 test ok. thank's for testing. 2 15
source_id: Value of 1 when the SnapEngage interaction was an offline message, value of 2 when it was a manual chat, or value of 3 if it was a proactive chat.
retries: The target system needs to respond with and HTTP 200 to confirm that the event has been received and processed. In the absence of a successful HTTP response, SnapEngage will retry the HTTP POST automatically for approximately 2 hours before sending it through email and flagging the event as sent.
using PHP: The XML content is a stream in XML format. You can not access this stream in the $_* variables of PHP. Please use this instead:
$xml = fopen("php://input","r");
Published January 30, 2013
No comments yet