Implementing your CRM adapter server
The developer framework is currently in BETA
This framework is in beta. Please submit a Github issue if you encounter any problems or have a question.
Each adapter will be configured to communicate with the corresponding server for that adapter. While the sample server that is provided through this framework is implemented in Javascript, you are free to implement your server in whatever language you prefer -- provided that it implements the interface properly.
Interfaces
Each server will need to implement each of the following interfaces:
- Contact lookup and matching
- Logging, updating and looking up call logs
- Logging SMS messages
- Creating placeholder contacts
- Unauthorizing users
The included sample server will save you time
The sample server that comes bundled with this developer framework handles a lot of the mundane and predictable work for you. To save time, we encourage you to implement your adapter in Javascript as well.
JWT token
The frontend client helps to maintain a user's current authentication context, and transmits to the server with every API call a jwtToken
parameter that encodes the data associated with the user making the current request. A JWT token, once decoded looks like this:
{
id: "<User ID in CRM>",
platform: "<the CRM being integrated with>"
}
With this information, server can validate and identify users so to perform API actions under their accounts on CRM platforms.
Decoding JWT tokens
The JWT token created by the framework uses the APP_SERVER_SECRET_KEY
environment variable as the secret to encode the token. To decode a token, we recommend using a third party library accordingly.
const { verify } = require('jsonwebtoken');
function decodeJwt(token) {
try {
return verify(token, process.env.APP_SERVER_SECRET_KEY);
} catch (e) {
return null;
}
}
OpenAPI specification
To assist developers in implementing their CRM adapter server, an OpenAPI specification has been produced that defines the input and output of that server and its various endpoints.