Page History
...
Last Updated:
Lastupdatedate |
---|
Livesearch | ||||
---|---|---|---|---|
|
Even though you use Vibes Mobile Engagement Platform as your main Opt-in database, your CRM system contains your Subscriber data, so you need to use APIs and Callbacks to communicate between your systems and the Platform.
The Platform does not collect additional data automatically, so if you want to take advantage of its extensive targeting and personalization capabilities, you can also use APIs to send the Platform the relevant data about Subscribers in your Customer Relationship Management (CRM) system. This will help you to do the following:
- Easily keep the Platform in sync with your most current
...
- Persons data.
- Have your system notified each time a Person is confirmed on a list or opts out of a list
...
- .
- Have your system notified when data is exchanged between the two systems.
...
This topic provides the following API and Callback examples:
...
The following are some common situations where you can use a Vibes API or Callback.
- When someone Subscribes using the Platform, you can use the Subscription Added Callback.
When someone updates their preferences and personal data outside of the Platform, you can use the Update a Person API.
Note Note: If there is custom data you want to store, you need to set up the custom fields ahead of time.
- When you need to add data about your Subscribers
...
New Subscribers - Customer Hosted
- , use the Add Person API.
- When someone unsubscribes, you can use the Subscription Removed Callback.
Note |
---|
Note: When a Person adds a mobile number to your preference center |
...
and you want to sign them up, you should go through the |
...
Web-Based Subscriber Management process as described in the previous scenario. |
Anchor | ||||
---|---|---|---|---|
|
...
Vibes Mobile Engagement Platform Hosted
When a new Subscriber comes into your mobile database through
...
a Vibes Mobile Engagement Platform landing page or Short Message Service (SMS) opt-in, your CRM system can receive a callback to an API endpoint.
The following example shows
...
a Subscription Added Callback.
Code Block | ||
---|---|---|
| ||
{ "callback:id","DEF123", "event_id":"AB234SDFD234", "callback_type":"subscription_added", "event_type":"subscription_added", //deprecated "event_date":"2017-02-15T15:42:23Z", "delivery_attempt":"1", "subscription":{ "person":{ "id":"ABC123", "external_id":"ex1234", "url":"/companies/: |
...
company_key/mobiledb/persons/ABC123" }, "subscription_list":{ "id":"1234", "url":"/companies/: |
...
company_key/mobiledb/subscription_lists/1234" }, "opt_in_date":"2017-01-15T15:34:52Z", "acquisition_campaign":{ "id":"2342312", "url":"/companies/: |
...
company_key/campaigns/acquisition/2342312" }, "url":"/companies/: |
...
company_key/mobiledb/persons/ABC123/subscriptions/1234" } } |
Note |
---|
Note: If you need |
...
the Platform to call a pre-existing API, the Vibes |
...
ProServe Group can create a custom integration solution for you. |
Anchor | ||||
---|---|---|---|---|
|
As shown in the following API Call example, when updating data about your Subscribers, you can use a unique identifier from your CRM system (external_person_id), or you can use the Vibes person_id.
The examples show API Version 1 and Version 2.
API Version 1
Code Block | ||
---|---|---|
| ||
{
"external_person_id":"EXT542342",
"mobile_phone":{
"mdn":"2995551234"
},
"custom_fields":{
"first_name":"John",
"last_name":"Doe"
}
} |
API Version 2 (E.164 MDN format)
Code Block | ||
---|---|---|
| ||
{
"external_person_id":"EXT542342",
"mobile_phone":{
"mdn":"+12995551234"
},
"custom_fields":{
"first_name":"John",
"last_name":"Doe"
}
} |
Note |
---|
Note: If you |
...
are unable to update by ID and only have the Mobile Directory Number (MDN), then you can use the Add Person API call and Vibes will merge the MDN's information with the existing Person. |
As shown in the following Return example, you will receive back an HTTP code letting you know if the Person was updated, if the Person was not found, or if the MDN can’t be changed.
Code Block | ||
---|---|---|
| ||
SUCCESS: 200
Same Person body you submitted is returned
FAILURE: 404 - person not found
no body
FAILURE: 409 - MDN cannot be changed
no body |
Anchor | ||||
---|---|---|---|---|
|
Use the following to create a new Person record.
POST /companies/ :company_key /mobiledb/persons/ |
The person_id, timezone_source, created_at and updated_at fields are not allowed, and any values will be ignored.
The mobile_phone field is optional and can be omitted. All custom fields are also optional and may be omitted.
Anchor | ||||
---|---|---|---|---|
|
When a Person opts out via their mobile device,
...
the Platform will send your system a notification that they are no longer a mobile Subscriber, as shown in the following example.
Code Block | ||
---|---|---|
| ||
{ "callback_id":"DEF124", "event_id":"AB234SDFD234", "callback_type":"subscription_removed", "event_type":"subscription_removed", //deprecated "event_date":"2017-03-15T15:42:23Z", "delivery_attempt":"1", "subscription":{ "person":{ "id":"ABC123", "external_id":"ex1234", "url":"/companies/: |
...
company_key/mobiledb/persons/ABC123" }, "subscription_list":{ "id":"1234", "url":"/companies/: |
...
company_key/mobiledb/subscription_lists/1234" }, "opt_in_date":"2017-01-15T15:34:52Z", "opt_out_date":"2017-02-18T15:34:52+0000", "opt_out_reason":"user_opt_out", "acquisition_campaign":{ "id":"2342312", "url":"/companies/: |
...
company_key/campaigns/acquisition/2342312" }, "url":"/companies/: |
...
company_key/mobiledb/persons/ABC123/subscriptions/1234 |
...
How to Add Data About Your Subscribers
Your CRM system can add near real-time data about your Subscribers at any time. Please work with your Vibes Account Manager to determine the best format in which to store your data. Vibes supports strings, multi-select and single-select lists, date/time, as well as other formats.
The following example shows how to use an API Call to add a Person.
Code Block | ||
---|---|---|
| ||
POST http://public-api.vibescm.com/mobiledb/persons
Headers
Content-Type: Application/JSON
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
BODY
{
"external_person_id":"EXT542342",
"mobile_phone":{
"mdn":"2995551234"
},
"custom_fields":{
"first_name":"John",
"last_name":"Doe"
}
} |
As shown in the following Return example, you will receive back an HTTP code letting you know if the Person was added, if an existing Person was found, and that your new entry was merged.
Code Block | ||
---|---|---|
| ||
SUCCESS: 200, 201 - person added or person merged/updated
Same Person body you submitted is returned |
Updating Data About Your Subscribers
As shown in the following API Call example, when updating data about your Subscribers, you can use a unique identifier in your CRM system (external_person_id), or you can use the Vibes person_id.
...
title | API Call: Updating a Person |
---|
...
"
} |
...
|
...
} |
...
Note: If you are unable to update by ID and only have the MDN, then you can use the Add Person API call, and Vibes will merge the MDN's information with the existing person.
As shown in the following Return example, you will receive back an HTTP code letting you know if the Person body was returned, if the Person was not found, or if the MDN can’t be changed.
...
title | Return: Updating a Person |
---|
...
|
...