Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Last Updated:

Lastupdatedate

Livesearch
placeholderSearch the Vibes Developer Wiki
typepage



Overview

The Vibes Push Device Callbacks for Vibes Push Notifications SDK are events that are triggered when a device is added, moved, updated, or removed to/from a Person. The callbacks provide important information about device association for a Person which lets the push messaging system send the right message to the right device for a Person.

Important Terminology

The following table shows the terminology used for device callbacks.

NameDescription
person_idThis is the primarily identifier of a Person in the Vibes system. It will always be created and associated to a device, and is also used for sending messages.
external_person_idThis is the primary identifier of a Person in the customer system and is associated to a Person using Associate Person to Device. It will always be created and associated to a device, and can also be used for sending messages. 
vibes_device_idThis is the primary identifier of a push device in the SDK and APIs.
push_tokenThis is the token provided by Apple or Google to send notifications to a device indicating if push is enabled or disabled.

Anchor
deviceaddedcallback
deviceaddedcallback
Device Added Callback

This event is triggered when a device is added to a Person, or a device is moved from one Person to another Person. The device object contains a reference to the device that was added. 

Code Block
{
  "event_id": "AB234SDFD234",    
  "callback_type": "device_added",
  "event_type": "device_added", //deprecated 
  "event_date": "2017-03-15T15:42:23Z",
  "delivery_attempt": "1",
  "person": {
    "person_id": "ABC123",
    "external_id": "ex1234",
    "url": "/companies/:company_key/mobiledb/persons/ABC123"
  },
  "push_device": {
    "app_id": "abe57f09-3126-4a7e-abc5-cac779710fd7",
    "vibes_device_id": "92e9d683-dd1e-4646-88d7-b89fc415a5c1",
    "push_token": "62171B3484EE776DB11083F06C90CF970B9C50AC263F46F5B3FBA3CBAF23601F",
    "device_os": "ANDROID",
    "url": "/mobile_apps/abe57f09-3126-4a7e-abc5-cac779710fd7/devices/92e9d683-dd1e-4646-88d7-b89fc415a5c1"
  }
}

Anchor
deviceremovedcallback
deviceremovedcallback
Device Removed Callback

This event is triggered when a device is removed from a Person, or a device is moved from one Person to another Person. The device object contains a reference to the device that was added.

Code Block
{
  "event_id": "AB234SDFD234",
  "callback_type": "device_removed",
  "event_type": "device_removed",  //deprecated  
  "event_date": "2017-03-15T15:42:23Z",
  "delivery_attempt": "1",
  "person": {
    "person_id": "ABC123",
    "external_id": "ex1234",
    "url": "/companies/:company_id/mobiledb/persons/ABC123"
  },
  "push_device": {
    "app_id": "abe57f09-3126-4a7e-abc5-cac779710fd7",
    "vibes_device_id": "92e9d683-dd1e-4646-88d7-b89fc415a5c1",
    "push_token": "62171B3484EE776DB11083F06C90CF970B9C50AC263F46F5B3FBA3CBAF23601F",
    "device_os": "ANDROID",
    "url": "/mobile_apps/abe57f09-3126-4a7e-abc5-cac779710fd7/devices/92e9d683-dd1e-4646-88d7-b89fc415a5c1"
  }
}

Anchor
deviceupdatedcallback
deviceupdatedcallback
Device Updated Callback

This event is triggered when a device had push enabled or disabled. The device object contains a reference to the device that was updated. The push_tokenis the value provided by Apple or Google to send notifications to those systems.

  • If push is enabled, the value will be present.
  • If push is disabled, the value will be blank.

Code Block
{
  "event_id": "AB234SDFD234",
  "callback_type": "device_updated", 
  "event_type": "device_updated", //deprecated
  "event_date": "2017-03-15T15:42:23Z",
  "delivery_attempt": "1",
  "person": {
    "person_id": "ABC123",
    "external_id": "ex1234",
    "url": "/companies/:company_id/mobiledb/persons/ABC123"
  },
  "push_device": {
    "app_id": "abe57f09-3126-4a7e-abc5-cac779710fd7",
    "vibes_device_id": "92e9d683-dd1e-4646-88d7-b89fc415a5c1",
    "push_token": "62171B3484EE776DB11083F06C90CF970B9C50AC263F46F5B3FBA3CBAF23601F",
    "device_os": "ANDROID",
    "url": "/mobile_apps/abe57f09-3126-4a7e-abc5-cac779710fd7/devices/92e9d683-dd1e-4646-88d7-b89fc415a5c1"
  }
}


Additional Resources