Integrations
Overview
Integrations allow you to extend the platform by subscribing to events.
Integrations endpoint - /integrations
Types of integrations
- Enrichment - Enrich your data with more information, example - HLR, MNP, email validation etc'
- Channels - ways to communicate with the audience, example - SMS routes, email servers, voice channels etc'.
- Utilities - general services like domains for the URL shortener, SMS test tools etc'
Integrations are a way to integrate 3rd party logic into the application.
Components
An integration usually works with 3 type of components -
- Platform - comm.com
- Middleware integration - translates comm.com events to the other service (hosted somewhere with web hooks) and vice versa
- Service provider - provides service (HLR, MNP, domains, email validation, voice, gateways ...) API
Integration events
Integration activated
When an integration is activated the following steps happen
- The integration receives a call with the required_fields required by it.
- The integration replies (synchronously) if the required fields are correct - usually by validating the api key with the service provider.
- The integration receives an API token with the privileges assigned in it's scope.
- The platform creates the necessary custom fields required by the integration, if a field with the name already exists it will skip it and use that field for information.
From now on, the integration will receive events.
Integration Deacativation
On the integration page you can select to deactivate it, once selected the following sequence happens.
- The integration receives a deactivation event
- The team access token is removed
- The custom fields remain in your account as to not remove information already processed by the integration.
Events supported
- Contact Created - when a contact is uploaded to platform
- SMS Created - when an SMS is sent to platform
Billing
Example billing flow | toggle
Some integrations don't need the service API key they will just use Comm.com API key and will be billed by comm.com. For example:
- Use activates integration on comm.com
- Comm.com sends the activation information to Integration middleware
- Comm.com sends events to middleware (Integration Events)
- Middleware sends response information
- Middleware sends billing request to Comm.com API endpoint with activation key.
Example:
- User activates PingProphet
- Comm.com checks balance of user > 0
- Comm.com sends activation to middleware
- Comm.com sends MNP request to middleware
- middleware sends MNP request to PP
- PP Middleware receives response from PP
- PP sends MNP response to endpoints
- PP middleware sends MNP cost to bill user
FAQ
What if user runs out of balance on comm.com?
- An event of user out of balance will be sent to middleware,
- Integration will be disabled on comm.com