Customer Data Sources allow you to pull information about your customers from other services directly into your Sirportly database. For example, you may wish to use them to pull details about your customer's account from your CRM system.
In order to retrieve data, we will send an HTTP POST request to your server with the customer's contact information and the server should respond with JSON with further customer information. We then store this information and display it within the Sirportly interface.
Data Sources can be found within the "Workflow" section of the Admin interface.
Whenever a ticket is updated, we will send an HTTP POST request to the URL of your Customer Data Source with two parameters:
type
- the type of contact method (this will be something like: email or twitter)data
- the actual contact details (in the case of email, this will be the e-mail address whereas with twitter it will be the customer's twitter username)You can optionally specify HTTP basic credentials when setting up the data source and your request will be authenticated with these.
If your system finds a match for the credentials we supply you should return a 200 OK
status with a JSON payload as outlined below. If the customer does not exist you should return 404 Not Found
status with no data.
The JSON payload contains all the information which you wish to sync with the Sirportly database. In it's most basic form, it can return no additional data about the customer:
{
"contact_methods": {
"email": [
"adam@atechmedia.com"
]
}
}
This contact_methods
hash should contain an array of contact data for each of our supported contact methods and must always include the contact method upon which we searched (so, if we search for email
and adam@atechmedia.com
, you must ensure that adam@atechmedia.com exists within the email array).
There are various variables which you can send back which will cause the customer record to be updated within the Sirportly database. This is useful if you wish to ensure consistency between key data. These changes do not get stored as custom data and will override any details which may already exist in the Sirportly database.
{
"contact_methods": {
"email": [
"adam@atechmedia.com"
]
},
"first_name": "Adam",
"last_name": "Cooke",
"reference": "AdamReference",
"company": "aTech Media",
"timezone": "London"
}
These variables, first_name
, last_name
, reference
, company
and timezone
are optional. If they are not present, we will simply keep the data we already store about the customer.
You can also add any custom data you wish to this payload. Custom data will be stored in the database and displayed to users through the Sirportly interface. There are three types of storing data in Sirportly: you can store a single variable, a hash of variables or an array of hashes. For example, you can include the following:
{
"Account Number": "123123123",
"Pets": {
"Cat": "Rascal",
"Dog": "Fido",
"Hamster": "Moriarty"
},
"Aliases": [
{
"Name": "Dave",
"URL": "http://dave.com"
},
{
"Name": "Steve",
"URL": "http://steve.com"
},
{
"Name": "John",
"URL": "http://john.com"
}
]
}
This custom data will be presented to user in tabular form, as shown below: