Custom integration – Implementation guide

Document version 1.2

This document will help you to enhance custom integration to Nicereply with few simple API REST end-points. Although you can build similar solution using Nicereply Developers API, this custom integration is leveraging the power of events in Nicereply. Therefore custom integration is behaving more like web hooks.

Security

Session layer

To securely transfer data via internet, make sure that all yours & Nicereply endpoints are communicating on HTTPS protocol in your implementation.

Authentication

In order to keep authentication simple, custom integration requires passing the “key” in a payload for all requests. For the request from Nicereply to your App the key is any string you will insert into setup of custom integration.

CSAT Customer Satisfaction

Custom integration for CSAT metric requires two API endpoints on the side of your CRM/help desk application.

Agents (read)

For proper working of CSAT flow Nicereply need know your customer service Agents. Therefore you need to implement Agents endpoint returning JSON encoded list of all your agents. Thank to this list of agents you will be able to create Accounts and assign collected ratings directly to one of your agents.

  • There are no limitations of endpoint URL, HTTPS is mandatory
  • username attribute in response should be unique ID string representing agent/user in your App.
  • requests may contains username attribute, which may be used as a filter and return agent who has the same username  

Request (application/json)

POST https://api.your-app.com/endpoint

{
  "key": "your-app-key",
  "username": "rating-username" // optional
}

Response 200 (application/json)

Content-Type: application/json
…

[
  {
    "fullname": "John Doe",
    "username": "johnd123",
    "email": "john.doe@example.com"
  },
  {
    "fullname": "Ann Miller",
    "username": "annm456",
    "email": "ann.miller@example.com"
  }
]

CSAT Ratings (write)

Nicereply expects that for pushing of the collected rating into your App, you will implement endpoint accepting POST request with payload containing the details of the rating:

  • There are no limitations of endpoint URL, HTTPS is mandatory
  • Location attribute should contain sting with geolocation. In a case that our GeoIP service fails to translate IP to location this attribute will be null
  • Ticket attribute will contain unique ID of your ticket/conversation/case which you earlier passed to Nicereply via Rating link URL
  • Each question object is abstracted from displayed emoticons to array of options respondent was allowed to choose from. You can still map this options to emoticons by the count of options: 2 thumbs, 3 smileys, 10 stars.

Request (application/json)

POST https://api.your-app.com/endpoint

{
  "key": "your-app-key",
  "metric": "CSAT",
  "created": "2016-06-03T09:10:11+0200",
  "username": "johnd123",
  "from": "Greg Customer",
  "location": "United States, Mountain View",
  "ipAddr": "188.120.321.123",
  "ticket": "ticket123",
  "questions": [
    {
      "type": "scale",
      "options": [1,5,10],
      "question": "How nice was my reply?",
      "answer": 5
    },
    {
      "type": "scale",
      "options": [1,2,3,4,5,6,7,8,9,10],
      "question": "How do you like our product?",
      "answer": 8
    }
  ],
  "comment": "Some valuable comment."
}

Response 201 (application/json)

Content-Type: application/json
…

{
  "status": 201
}

In a case of any questions or suggestions, do not hesitate to contact us.

Still need help? Contact Us Contact Us