Connect Alliants and Peoplevine
Alliants integration
This documentation covers the process of pushing data from Peoplevine to the Alliants API.
Prerequisites
Configuration for Alliants integration must contain several settings:
Configuration name | Description |
---|---|
Url | Alliants API endpoint |
Location Name | Description used in profile's loyalty Id |
Brand ID | Used in requesting parameters |
Location ID | Used to specify location of badges (memberships) |
Bearer Token: | Token paired to Alliants API endpoint |
Data Flow
Sync profile
PVConnect.Models.Connect.Profile | Alliants UpsertProfile Request |
---|---|
first_name | first_name |
middle_name | middle_name |
last_name | last_name |
customer_name | displayed_name |
phone_number | phone_number * |
membership_title | title |
company_name | company |
customer_no | external_id |
birthdate | date_of_birth |
"Home house is {locationName}" | loyaltyId ** |
"https://peoplevine.com/admin_customer_menu.aspx?customer_no={member.customer_no}" | external_link |
*phone number will be pushed successfully to Alliants API only if the value passes e164 standard. To improve the possibility of sending phone number values a couple retry requests will be sent with trials of different phone number constructions. If they all fail, no phone number will be sent, so a profile will still be created/updated. *loyalty Id is set at the creation of the profile, but in later cases if all badges located at that home house are detached from that profile, a change of Home house will be triggered.
Add Membership
When a new membership is defined for PV client a post to the Alliants API will create/update the membership list for the targeted profile. Badge kind unique identifier is mapped as pv membership's membership sku.
PVConnect.Models.Service.Membership_Details | Alliants Create BadgeKind request |
---|---|
membership_title, | name |
membership_sku | code |
vip_status // { loyalty: 1, vip_status: 2 , membership} | kind * |
"default" | colour_theme |
{} //new List<string>() | code_array |
*to specify location all badge kind properies are set to "vip_status"
PVConnect.Models.Service.Membership_Details | Add Badge to Profile request |
---|---|
member.membership_sku | badge_kind_id |
"api" | source |
locationId // locationId by integration's configuration | location_id |
Cancel Membership
When existing membership is canceled for PV client, a post to Alliants API will detach membership from the targeted profile's badge list. Validations must pass. Note that the badge is removed from the list of the profile, but the badge kind as a type is still kept in Alliants to prevent null reference to other Allaints profiles that might link to that same badge kind type.
Last updated