Exchange protocols allowed

Home » DOCOON APIs » Callback API » Exchange protocols allowed

The sending of a notification can be done according to 2 possible protocols, by sending an email or by sending an HTTP request.

 

Email

An email is sent to the specified address in the client configuration. The information contained in the email depends on the type of notifications. The template of the email is configurable by client (HTML file to be provided). Also the subject of the email is also configurable by client.

 

API HTTP

The client can provide an address on which we will post (technically “HTTP POST”) the different objects whose content depends on the notification.

The format of the data posted can be of the form (at the choice of the client):

JSON (“application/json”), dates are under the following format “/Date(XXXXXXXX)/” where XXXXXXXX is an Epoch date (number of milliseconds since 01/01/1970).
XML (“application/xml”), dates are under Epoch format
TEXT (“text/plain”)
Form (“application/x-www-form-urlencoded”)

 

Configuration Form

For the customer to receive notifications whith “Form” format, a TXT file named NotificationPostTemplate_xxxxxx.txt where xxxxxx is notification (EndOfJob for example) must be created. Place this file in the customer root directory.

Available notifications :

OptOut
SystemError
EndOfItem
EndOfJob
JobStatusChanged
RealTimeStatus
RetrieveFile
InboundSMS
ItemStatusChanged
DataCollectionFilled
EmailOpened
LinkClicked
ShortUrlClicked

 

In the customer template, formatting is possible, you need to fill the variables wanted with the format [text expected by the customer] = myVariable. The variable must start with `. Variables names can be found on this page: Email protocol specificity.

Template example
<br/>
<br/>
<br/>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>Type de notification :</td>
<td>`EventType</td>
</tr>
<tr>
<td>Date de la notification :</td>
<td>`EventDateTime</td>
</tr>

The target web page (must reply an “HTTP/200” result under 300 ms) is done by the customer, and its URL must be provided to our support in order to setup the account (or set up from the customer portal). If a different HTTP code is replies by the web page (possible incident on the client side), our services retry the sending for 60 minutes. After this, we put the notification aside. Aside notifications can be resent by our support when the customer incident is solved.If too many errors are noticed by our support and we are not able to reach the customer, we will deactivate the setup. A deactivated setup can no longer produce notifications. It won’t be possible to recreate it.