CROWDMANAGERCROWDMANAGER

Customer Profiles

Description

A customer profile resource represents a physical person with people objects attached as it's social identities, who was interacting with CROWDMANAGER suite in one way or another (participating in campaigns, ineteracting with socialnetwork streams etc). Each customer profile field is being calculated from related social identities in order to store more information about physical person. For now we only provide read only integration. This will allow partners to import data about filtered target audience for further analytics of engagement statistics within external systems.


Fields

Name Description Type/Supported Values Supported Methods
id Id of the participant long GET
href The url link to the profile string GET
displayName Customer name - fullName if present or concatenated first and last name string GET
fullName Customer full name string GET
firstName Customer first name string GET
lastName Customer last name string GET
dateOfBirth Customer the date of birth datetime GET
imageUrl Customer profile image url string GET
gender Customer gender Enum {"male","female","undefined"} GET
location Customer location string GET
languageCode Customer languageCode string GET
email Customer email string GET
street Customer street string GET
postalCode Customer postalCode string GET
city Customer city string GET
county Customer county string GET
country Customer country string GET
timeZone Customer time zone string GET
phoneNumber Customer phone mumber string GET
customAuthenticationFields Customer Profile custom authentication fields* json string {"key1":"val1","key2":"val2",...} GET

Permissions


Read a list with filtering

List the customer profiles fuzzy (typo tolerant) or strictly matched against the given search critera.

Endpoint

GET https://api.crowdmanager.io/v2/{organization-id}/customerinsights/customerprofiles[?pageIndex={int}pageSize={int}&searchQuery={CustomerInsightSource}~{string}]

Parameter "searchQuery" is responsible for filtering results. Typically it consists of three parts: customerInsightSource, operator and value. CustomerInsightSource can be one of next values:

[Any|SocialNetworkStreamName|CampaignAppName|PersonalDetails|Tag]

There are two types of operators:

[~ | =]

Fuzzy operator (~) is search typo tolerant, while strict (=) will result in customer profiles who directly match the given scope criteria. Value is a simple string with the value by which customerProfiles in given customerInsightSource scope should be filtered.

Example

If you want to narrow down the resulted customer profile list to only profiles of people participated in your "WinterContest" campaign and take first 15 profiles matched using strict criteria - the request will look like:

Example

Request

GET https://api.crowdmanager.io/v2/1201/customerinsights/customerprofiles?pageIndex={0}pageSize={15}&searchQuery={CampaignAppName}={WinterContest}]
Authorization: Basic aaabbbccc111222333
Accept: application/vnd.api+json

Response

{  
   "links":{  
      "customerProfiles.people":{  
         "href":"https://api.crowdmanager.io/v2/1201",
         "type":"people"
      }
   },
   "linked":{  
      "people":[  
         {  
            "id":"1000",
            "type":"socialNetworkPersons",
            "externalId":"9999999999",
            "network":"facebook",
            "customData":null,
            "profileUrl":"https://www.facebook.com/9999999999",
            "profileName":"",
            "firstName":"John",
            "lastName":"Doeh",
            "displayName":"John Doeh",
            "gender":null,
            "dateOfBirth":null,
            "isAdult":null,
            "location":null,
            "profileImageUrl":"https://graph.facebook.com/9999999999/picture?type=square",
            "customerProfileId":1,
            "emailAddress":null,
            "tenantId":1201,
            "isDisabled":false,
            "systemId":null,
            "language":null,
            "country":null,
            "customAuthenticationFields":"{\"key1\":\"val1\",\"key2\":\"val2\"}"
         },
         {  
            "id":"1001",
            "type":"people",
            "fullName":"Johny",
            "displayName":"Johny",
            "gender":null,
            "dateOfBirth":null,
            "isAdult":null,
            "location":null,
            "profileImageUrl":null,
            "customerProfileId":1,
            "emailAddress":null,
            "tenantId":1201,
            "isDisabled":false,
            "systemId":null,
            "language":null,
            "country":null,
            "customAuthenticationFields":"{\"key3\":\"val3\",\"key4\":\"val4\"}"
         },
         {  
            "id":"1002",
            "type":"people",
            "fullName":"Joanna Doeh",
            "displayName":"Joanna Doeh",
            "gender":null,
            "dateOfBirth":null,
            "isAdult":null,
            "location":null,
            "profileImageUrl":null,
            "customerProfileId":2,
            "emailAddress":null,
            "tenantId":1201,
            "isDisabled":false,
            "systemId":null,
            "language":null,
            "country":null,
            "customAuthenticationFields":null
         }
      ]
   },
   "customerProfiles":[  
      {  
         "id":"1",
         "href":"https://api.crowdmanager.io/v2/1201/customerinsights/customerprofiles/1",
         "type":"customerProfiles",
         "tenantId":1201,
         "displayName":"John Doeh",
         "firstName": "John",
         "lastName": "Doeh",
         "imageUrl":"https://graph.facebook.com/10206625616473834/picture?type=square",
         "email":"johndoeh@gmail.com",
         "city":"gdansk",
         "country":"Poland",
         "phoneNumber":"tel:+47-999-99-999",
         "customAuthenticationFields":"{\"key1\":\"val1\",\"key2\":\"val2\",\"key3\":\"val3\",\"key4\":\"val4\"}"
         "links":{  
            "people":[  
               "1000",
               "1001"
            ]
         }
      },
      {  
         "id":"2",
         "href":"https://api.crowdmanager.io/v2/1201/customerinsights/customerprofiles/2",
         "type":"customerProfiles",
         "tenantId":1201,
         "displayName":"Joanna Doeh",
         "fullName": "Joanna Doeh",
         "email":"joannadoe@mail.com",
         "links":{  
            "people":[  
               "1002"
            ]
         }
      }
   ]
}

Read

Returns a single customer profile for given id.

Endpoint

GET https://api.crowdmanager.io/v2/{organization-id}/customerinsights/customerprofiles/{id}

Example

Request

GET https://api.crowdmanager.io/v2/1201/customerinsights/customerprofiles/1
Authorization: Basic aaabbbccc111222333
Accept: application/vnd.api+json

Response

{  
   "links":{  
      "customerProfiles.people":{  
         "href":"https://api.crowdmanager.io/v2/1201",
         "type":"people"
      }
   },
   "linked":{  
            "people":[  
         {  
            "id":"1000",
            "type":"socialNetworkPersons",
            "externalId":"9999999999",
            "network":"facebook",
            "customData":null,
            "profileUrl":"https://www.facebook.com/9999999999",
            "profileName":"",
            "firstName":"John",
            "lastName":"Doeh",
            "displayName":"John Doeh",
            "gender":null,
            "dateOfBirth":null,
            "isAdult":null,
            "location":null,
            "profileImageUrl":"https://graph.facebook.com/9999999999/picture?type=square",
            "customerProfileId":1,
            "emailAddress":null,
            "tenantId":1201,
            "isDisabled":false,
            "systemId":null,
            "language":null,
            "country":null,
            "customAuthenticationFields":"{\"key1\":\"val1\",\"key2\":\"val2\"}"
         },
         {  
            "id":"1001",
            "type":"people",
            "fullName":"Johny",
            "displayName":"Johny",
            "gender":null,
            "dateOfBirth":null,
            "isAdult":null,
            "location":null,
            "profileImageUrl":null,
            "customerProfileId":1,
            "emailAddress":null,
            "tenantId":1201,
            "isDisabled":false,
            "systemId":null,
            "language":null,
            "country":null,
            "customAuthenticationFields":"{\"key3\":\"val3\",\"key4\":\"val4\"}"
         }
      ]
   },
   "customerProfiles":{  
         "id":"1",
         "href":"https://api.crowdmanager.io/v2/1201/customerinsights/customerprofiles/1",
         "type":"customerProfiles",
         "tenantId":1201,
         "displayName":"John Doeh",
         "firstName":"John",
         "lastName":"Doeh",
         "imageUrl":"https://graph.facebook.com/10206625616473834/picture?type=square",
         "email":"johndoeh@gmail.com",
         "city":"gdansk",
         "country":"Poland",
         "phoneNumber":"tel:+47-999-99-999",
         "customAuthenticationFields":"{\"key1\":\"val1\",\"key2\":\"val2\",\"key3\":\"val3\",\"key4\":\"val4\"}"
         "links":{  
            "people":[  
               "1000",
               "1001"
            ]
         }
      }
}

Endpoint

GET https://api.crowdmanager.io/v2/{organization-id}/customerinsights/cmtoken[?token={string}&provider={string}]

This endpoint will transform supported third-party authentication token into MyPage User token. It returns token as plain string.

Example

Request

https://api.crowdmanager.io/v2/1201/customerinsights/cmtoken?token=XYZ&provider=sportsalliance
Authorization: Basic aaabbbccc111222333
Accept: application/vnd.api+json

Response

ZYX