Experience
API for creating and managing Experiences as well as all related and/or dependent models such as but not limited to Groups, Templates, Candidates, etc.
Experience
The Experience represents a single marketing initiative which can be created from scratch or imported from various marketing tools.
Models
Experience
Primary model for all Experiences.
field | DataType | Description |
---|---|---|
id | string | unique identifier for experience |
label | string | user facing label for the experience |
slug | string | slugified versions of the title for internal use |
vehicle | object | see Experience Vehicle for details |
dates | object | see Experience Dates for details |
published | date | date the experience was first published |
preview | boolean | flag to determine if experience is a preview |
tags | []string | list of tags for classification such as promo |
segment_id | string | id of filter segment associated with experience |
generated_segments | object | See Experience Generated Segments for details |
parent_group_id | string | id of parent group associated with experience |
state | object | see Experience State for details |
aid | int | aid of the account that the experience belongs to |
account_id | string | id of the account that the experience belongs to |
user_id | string | user_id for experience creator |
created | date | date experience was created |
updated | date | date experience was last updated |
deleted | date | date experience was deleted |
Experience Dates (dates)
Nested model containing execution date information for Experience.
field | DataType | Description |
---|---|---|
start_date | date | date the experience should begin |
end_date | date | date the experience should end |
Experience Vehicle (vehicle)
Nested model containing all data related to execution such as provider, associated works, etc.
field | DataType | Description |
---|---|---|
external_id | string | hashed id of provider and origin id for experience |
provider_id | string | id of provider associated with experience |
provider_slug | string | slug associated with provider for experience |
provider_channel | string | channel associated with experience (accepted values: web , email , ad , mobile ) |
tactic | string | tactic associated with the experience |
import_detail | object | key/value pairs representing import configuration details such as auth id |
export_work_id | string | id of associated export work |
detail | object | key/value pairs representing configuration details specific to the vehicle |
detail_override | object | key/value pairs representing overrides to the detail payload not supported in current interface |
Experience Generated Segments (generated_segments)
Nested model containing ids for all of the system generated and managed audiences for an Experience.
field | DataType | Description |
---|---|---|
fixed | string | id of the fixed segment (stable id for unstable segment_id) |
target | string | id of the target segment (users that are eligible to get the experience) |
decision | string | id of decision segment (users that are getting the experience) |
Experience State (state)
Nested model containing both the user managed state as well as system managed state.
field | DataType | Description |
---|---|---|
status | string | user managed state for experience (accepted values: published , unpublished ) |
system_status | string | system managed state for experience (accepted values: draft , paused , live , scheduled , ended , warning , error , externally_managed ) |
List
Endpoint fetches all Experience records available to provided authorization token as well as various side-loaded dependencies.
Sideloading: A variety of dependent or associated data will be side-loaded as part of the primary request. The list of side-loaded data for this particular request is:
All available Experience templates.
All parent groups one branch up the tree for returned Experiences.
Parameters | ||
---|---|---|
limit | int (optional) Ex: 10 | limit the number of Experience records returned |
provider | string (optional) Ex: 65b80b0a8e0544aa8144022b3c085da1 | id of provider to filter results by |
Request
Headers
Authorization: {token}
Response 200
Body
{
"experience_groups": [
{
"account_id": "fake9bbad3f347be8ab37d771cc3aed0",
"aid": 111,
"class": "stage",
"created": "2019-05-20T19:23:35.331Z",
"dates": {},
"generated_segments": {
"fixed": "5a17867a9d8f07d13295cbc9abb576d3",
"target": "0fec3bec5afc7e0c78a5e4f78e47b776"
},
"id": "fde765d8067e23f90ee315d674b52c19",
"label": "Sample Stage",
"parent_group_id": "ef9154b3a5f982e1bd4ec0230664b57c",
"prioritization_id": "",
"report_id": "",
"segment_id": "a12eff14b09149c450c41eb8d1a76467",
"slug": "sample_stage",
"updated": "2019-05-20T19:23:35.523Z",
"user_id": "a5c80d6d61f39b3f34024164c6597cd2"
}
],
"experience_templates": [
{
"class": "experience",
"description": "This experience will add a slideout to your website that asks unknown users to share their email address. By limiting this audience to unknown users, you free up this real estate for other marketing efforts (like a call-to-action or a content recommendation) targeted at known users. All experiences are fully customizable, from the copy to the design.",
"experience": {
"dates": {},
"generated_segments": {},
"label": "Get More Email Subscribers Experience",
"state": {},
"vehicle": {
"detail": {
"appearsOn": [],
"attachment": "bottom-left",
"body": "Share your email for personalized offer",
"colors": [
{
"hex": "#f1f1f1",
"key": "background",
"title": "Background"
},
{
"hex": "#888",
"key": "headline",
"title": "Headline"
},
{
"hex": "#444",
"key": "text",
"title": "Body Text"
},
{
"hex": "#bbb",
"key": "close",
"title": "Close Button"
},
{
"hex": "#444",
"key": "actionText",
"title": "Submit Button Text"
},
{
"hex": "#fff",
"key": "actionBackground",
"title": "Submit Button"
},
{
"hex": "#bbb",
"key": "cancelText",
"title": "Cancel Button Text"
},
{
"hex": "#f1f1f1",
"key": "cancelBackground",
"title": "Cancel Button"
}
],
"displayOptions": [],
"formFields": [
{
"isEnabled": true,
"isRequired": true,
"placeholder": "Enter your email",
"slug": "email"
}
],
"headline": "Let's get to know each others",
"image": "",
"layout": "slideout",
"okMessage": "Confirm",
"tactic": "capture_leads",
"theme": "light"
},
"provider_channel": "web",
"provider_id": "65b80b0a8e0544aa8144022b3c085da1",
"provider_slug": "pathfora",
"tactic": "capture_leads"
}
},
"headline": "Collect email addresses from unknown visitors",
"id": "864a26fd5d5148b0b7fa187828368b81",
"image": "https://storage.googleapis.com/lytics_docs/campaign_templates/001-unk[email protected]",
"label": "Get More Email Subscribers",
"slug": "experience-template-1",
"teaser": "Use a lead collection form on only unknown visitors.",
"thumbnail": "https://storage.googleapis.com/lytics_docs/campaign_templates/campaign-template-lead-capture.svg"
}
],
"experiences": [
{
"account_id": "fake9bbad3f347be8ab37d771cc3aed0",
"aid": 111,
"created": "2019-05-20T19:24:19.135Z",
"dates": {
"start_date": "2019-05-20T07:00:00Z"
},
"generated_segments": {
"decision": "ef992361f72b1c33201044d1e499ee3f",
"fixed": "0effd94db05970ff1b46f3ccfbb5aa96",
"target": "720b5cedaac6f6ac2ff69ba322eb502a"
},
"id": "76c7115c492e78cfd12f30a7389919bb",
"label": "Sample Experience",
"parent_group_id": "fde765d8067e23f90ee315d674b52c19",
"segment_id": "bd527a3e492e831a09a9af92d235587b",
"slug": "sample_experience",
"state": {
"status": "unpublished",
"system_status": "draft"
},
"updated": "2019-05-20T19:24:19.298Z",
"user_id": "a5c80d6d61f39b3f34024164c6597cd2",
"vehicle": {
"detail": {
"appearsOn": [
{
"exclude": false,
"match": "substring",
"value": "showon.com"
}
],
"attachment": "middle-center",
"body": "Sample Body",
"className": null,
"colors": [
{
"hex": "#f1f1f1",
"key": "background",
"title": "Background"
},
{
"hex": "#888",
"key": "headline",
"title": "Headline"
},
{
"hex": "#444",
"key": "text",
"title": "Text"
},
{
"hex": "#bbb",
"key": "close",
"title": "Close"
},
{
"hex": "#444",
"key": "actionText",
"title": "Action text"
},
{
"hex": "#fff",
"key": "actionBackground",
"title": "Action background"
},
{
"hex": "#bbb",
"key": "cancelText",
"title": "Cancel text"
},
{
"hex": "#f1f1f1",
"key": "cancelBackground",
"title": "Cancel background"
}
],
"displayOptions": [],
"headline": "Sample Headline",
"image": "",
"layout": "modal",
"okMessage": null,
"targetURL": "https://lytics.com",
"templateToken": null,
"theme": "light"
},
"provider_id": "65b80b0a8e0544aa8144022b3c085da1",
"provider_slug": "pathfora",
"tactic": "target_url"
}
}
],
"message": "success",
"status": 200
}
Fetch
Endpoint fetches a single Experience record by id as well as various side-loaded dependencies.
Sideloading: A variety of dependent or associated data will be side-loaded as part of the primary request. The list of side-loaded data for this particular request is:
- All parent groups all the way up the family tree for the Experience.
Parameters | ||
---|---|---|
id | string (required) Ex: 76c7115c492e78cfd12f30a7389919bb | id of the experience. if `orphan` is passed as Experience it will list all Experiences with no parent. |
Response 200
Body
{
"experience": {
"account_id": "fake9bbad3f347be8ab37d771cc3aed0",
"aid": 111,
"created": "2019-05-20T19:24:19.135Z",
"dates": {
"start_date": "2019-05-20T07:00:00Z"
},
"generated_segments": {
"decision": "ef992361f72b1c33201044d1e499ee3f",
"fixed": "0effd94db05970ff1b46f3ccfbb5aa96",
"target": "720b5cedaac6f6ac2ff69ba322eb502a"
},
"id": "76c7115c492e78cfd12f30a7389919bb",
"label": "Sample Experience",
"parent_group_id": "fde765d8067e23f90ee315d674b52c19",
"segment_id": "bd527a3e492e831a09a9af92d235587b",
"slug": "sample_experience",
"state": {
"status": "unpublished",
"system_status": "draft"
},
"updated": "2019-05-20T19:24:19.298Z",
"user_id": "a5c80d6d61f39b3f34024164c6597cd2",
"vehicle": {
"detail": {
"appearsOn": [
{
"exclude": false,
"match": "substring",
"value": "showon.com"
}
],
"attachment": "middle-center",
"body": "Sample Body",
"className": null,
"colors": [
{
"hex": "#f1f1f1",
"key": "background",
"title": "Background"
},
{
"hex": "#888",
"key": "headline",
"title": "Headline"
},
{
"hex": "#444",
"key": "text",
"title": "Text"
},
{
"hex": "#bbb",
"key": "close",
"title": "Close"
},
{
"hex": "#444",
"key": "actionText",
"title": "Action text"
},
{
"hex": "#fff",
"key": "actionBackground",
"title": "Action background"
},
{
"hex": "#bbb",
"key": "cancelText",
"title": "Cancel text"
},
{
"hex": "#f1f1f1",
"key": "cancelBackground",
"title": "Cancel background"
}
],
"displayOptions": [],
"headline": "Sample Headline",
"image": "",
"layout": "modal",
"okMessage": null,
"targetURL": "https://lytics.com",
"templateToken": null,
"theme": "light"
},
"provider_id": "65b80b0a8e0544aa8144022b3c085da1",
"provider_slug": "pathfora",
"tactic": "target_url"
}
},
"experience_groups": [
{
"account_id": "fake9bbad3f347be8ab37d771cc3aed0",
"aid": 111,
"class": "stage",
"created": "2019-05-20T19:23:35.331Z",
"dates": {},
"generated_segments": {
"fixed": "5a17867a9d8f07d13295cbc9abb576d3",
"target": "0fec3bec5afc7e0c78a5e4f78e47b776"
},
"id": "fde765d8067e23f90ee315d674b52c19",
"label": "Sample Stage",
"parent_group_id": "ef9154b3a5f982e1bd4ec0230664b57c",
"prioritization_id": "",
"report_id": "",
"segment_id": "a12eff14b09149c450c41eb8d1a76467",
"slug": "sample_stage",
"updated": "2019-05-20T19:23:35.523Z",
"user_id": "a5c80d6d61f39b3f34024164c6597cd2"
},
{
"account_id": "fake9bbad3f347be8ab37d771cc3aed0",
"aid": 111,
"class": "campaign",
"created": "2019-05-20T19:23:35.101Z",
"dates": {},
"generated_segments": {
"fixed": "933188e4a53708d819a7e29069115ce5"
},
"id": "ef9154b3a5f982e1bd4ec0230664b57c",
"label": "Sample Journey",
"prioritization_id": "468ac999a5f2577ed33bf7e816fcd209",
"report_id": "",
"segment_id": "f1ac0f11d355a29ad128218458129b0a",
"slug": "sample_journey",
"updated": "2019-05-20T19:23:35.313Z",
"user_id": "a5c80d6d61f39b3f34024164c6597cd2"
}
],
"message": "success",
"status": 200
}
Update
Endpoint updates a single Experience record.
Sideloading: None
Request
Headers
Authorization: {token}
Body
// when not updating state
{
"experience": {
"id": "96d774bca4ac26c92aa323b246a148fd",
"label": "Sample Updated Label via PATCH"
}
}
// when altering state
{
"experience": {
"state": {
"status": "published"
}
"id": "96d774bca4ac26c92aa323b246a148fd"
}
}
Response 200
Body
{
"experience": {
"account_id": "fake9bbad3f347be8ab37d771cc3aed0",
"aid": 111,
"created": "2019-05-20T23:01:38.971Z",
"dates": {},
"generated_segments": {
"decision": "2976051401ec591b9022fc0c795d8dbd",
"fixed": "002b5968bf90ac3d20b38c82fa04c5dc",
"target": "cfd04d3aafa1fae7609b7f8c841fe5e3"
},
"id": "96d774bca4ac26c92aa323b246a148fd",
"label": "Sample Updated Label via PATCH",
"parent_group_id": "fde765d8067e23f90ee315d674b52c19",
"slug": "sample_post",
"state": {
"status": "unpublished",
"system_status": "draft"
},
"updated": "2019-05-20T23:04:42.99823656Z",
"vehicle": {
"detail": {
"appearsOn": [
{
"exclude": false,
"match": "substring",
"value": "samplepost.com"
}
],
"attachment": "middle-center",
"body": "Sample Body",
"className": null,
"colors": [],
"displayOptions": [],
"headline": "Sample Headline",
"image": "",
"layout": "modal",
"okMessage": null,
"targetURL": "https://lytics.com",
"templateToken": null,
"theme": "dark"
},
"provider_id": "65b80b0a8e0544aa8144022b3c085da1",
"provider_slug": "pathfora",
"tactic": "target_url"
}
},
"message": "success",
"status": 200
}
Candidate
Candidates provide visibility and debugging potential into the first phase of Delivery Optimization, candidate filtering and prioritization.
Candidate
Primary model for Experience candidates.
field | DataType | Description |
---|---|---|
experience_id | string | id of experience candidate represents |
experience_slug | string | slug of experience candidate represents |
priority | object | see candidate prioritization |
aggression | float64 | aggression score assigned to experience |
provider_id | string | id of provider for candidate |
provider_slug | string | slug of provider for candidate |
created | date | date experience was created |
recommendation_collection_id | string | if of content collection for recommendation if applicable |
tags | []string | set of user defined attributes to be leveraged during final decision |
attributes | []string | set of system defined attributes to be leveraged in final decision |
decision_segment_id | string | id of system managed decision segment for experience |
target_segment_id | string | id of system managed target segment for experience |
Candidate Prioritization
Model used for candidate prioritization context.
field | DataType | Description |
---|---|---|
journey | int | prioritization score for journey |
stage | int | prioritization score for stage |
experience | int | prioritization score for experience |
List
Fetches all Experience candidate records available to token.
Request
Headers
Authorization: {token}
Response 200
Body
{
"experience_candidates": [
{
"aggression": 1,
"attributes": [
"blast_email"
],
"created": "2019-05-20T23:35:10.62005273Z",
"decision_segment_id": "68677dfcdcb6152b104e7790bb548837",
"experience_id": "5c409eae1d1d660b340d9e52b60a3d38",
"experience_slug": "sample_candidate_one",
"priority": {
"campaign": -1,
"experience": -1,
"stage": -1
},
"provider_id": "391a283687de410c800b2c20ccbc558e",
"provider_slug": "iterable",
"recommendation_collection_id": "",
"tags": [],
"target_segment_id": "ac089d5a6300ee714d1c2a1a9b75c932"
},
{
"aggression": 1,
"attributes": [
"triggered_email"
],
"created": "2019-05-20T23:35:10.620144172Z",
"decision_segment_id": "cdfa0f86dee4f355c6572b1ea506c661",
"experience_id": "d6e7cb1b2995d61bed37a564e9345034",
"experience_slug": "sample_candidate_two",
"priority": {
"campaign": 0,
"experience": 1,
"stage": 2
},
"provider_id": "391a283687de410c800b2c20ccbc558e",
"provider_slug": "iterable",
"recommendation_collection_id": "",
"tags": [],
"target_segment_id": "50a2d8ead867beeae7af37194195394f"
}
],
"message": "success",
"status": 200
}
Preview Config
Renders a JavaScript file containing a single Experiences Pathfora configuration for previewing a web personalize Experience.
Response 200
Body
(function(w) {
var lyticsId = "a4525ab59e7505e484176ed80581042b";
var pfaWidgetConfig = [];
var pfa_87d5d942f7e0a7c6fe88f31293566d46 = w.pathfora.Message({
"id": "87d5d942f7e0a7c6fe88f31293566d46",
"headline": "Welcome Back!",
"msg": "Welcome Back!",
"layout": "slideout",
"position": "bottom-left",
"variant": "1",
"okShow": false,
"cancelShow": false,
"theme": "light",
"colors": {
"actionBackground": "#fff",
"actionText": "#444",
"background": "#f1f1f1",
"cancelBackground": "#f1f1f1",
"cancelText": "#bbb",
"close": "#bbb",
"headline": "#888",
"text": "#444"
},
"required": {
"email": false
},
"fields": {
"company": false,
"email": true,
"message": false,
"name": false,
"phone": false,
"title": false
},
"displayConditions": {}
});
pfaWidgetConfig.push(pfa_87d5d942f7e0a7c6fe88f31293566d46);
var acctConfig = {
generic: {
"displayConditions": {
"impressions": {
"global": {
"session": 5
}
}
}
}
};
w.pathfora.initializeWidgets(pfaWidgetConfig, acctConfig);
}(window));
Production Config
Renders a JavaScript file containing all published Experiences Candidate Pathfora configurations.
Response 200
Body
var _pfacfg=_pfacfg||{};
_pfacfg.candidates=_pfacfg.candidates||{};
_pfacfg.candidates["87d5d942f7e0a7c6fe88f31293566d46"]={
"segment":"all",
"widget":window.pathfora.Message({
"id":"87d5d942f7e0a7c6fe88f31293566d46",
"headline":"Welcome Back!",
"msg":"Welcome Back!",
"layout":"slideout",
"position":"bottom-left",
"variant":"1",
"okShow":false,
"cancelShow":false,
"theme":"light",
"colors":{
"actionBackground":"#fff",
"actionText":"#444",
"background":"#f1f1f1",
"cancelBackground":"#f1f1f1",
"cancelText":"#bbb",
"close":"#bbb",
"headline":"#888",
"text":"#444"
},
"required":{
"email":false
},
"fields":{
"company":false,
"email":true,
"message":false,
"name":false,
"phone":false,
"title":false
},
"displayConditions":{}
})
};
_pfacfg.variations=_pfacfg.variations||{};
_pfacfg.variations["0e588fdc02c0d42483766f4cf0f2cd45"]={
"segment":"ly_binge_user",
"widget":window.pathfora.Message({
"id":"0e588fdc02c0d42483766f4cf0f2cd45",
"headline":"x",
"msg":"y",
"layout":"modal",
"position":"middle-center",
"variant":"1",
"okShow":true,
"okMessage":"Learn More",
"cancelMessage":"No Thanks",
"confirmAction":{
"name":"Confirm Action",
"callback":function(){
window.location.href="https://a.com";
}
},
"cancelShow":false,
"theme":"light",
"colors":{
"actionBackground":"#fff",
"actionText":"#444",
"background":"#f1f1f1",
"cancelBackground":"#f1f1f1",
"cancelText":"#bbb",
"close":"#bbb",
"headline":"#888",
"text":"#444"
},
"displayConditions":{}
})
};
_pfacfg.abTestConfigs=_pfacfg.abTestConfigs||[];
_pfacfg.acctcfg={
"generic":{
"displayConditions":{
"impressions":{
"global":{
"session":5
}
}
}
}
};
Group
Groups provide the ability to organize and prioritize Experiences or other Experience Groups. Used heavily in the management of "Journeys" and "Stages" in relation to the Lytics admin UI.
field | DataType | Description |
---|---|---|
id | string | unique identifier for group |
label | string | user facing label for the group |
slug | string | slugified versions of the title for internal use |
class | string | class of group such as journey or stage |
parent_group_id | string | id of parent group associated with group |
child_type | string | type of associated children such as experience |
prioritization_id | string | id of associated prioritization record |
child_groups | []object | see Group |
experiences | []object | see Experience |
dates | object | see Experience Dates for details |
segment_id | string | id of filter segment associated with group |
generated_segments | object | See Experience Generated Segments for details |
report_id | string | id of associated discovery report |
aid | int | aid of the account that the group belongs to |
account_id | string | id of the account that the group belongs to |
user_id | string | user_id for group creator |
created | date | date group was created |
updated | date | date group was last updated |
deleted | date | date group was deleted |
List
Fetches all Experience Group records available to the authorization token.
Parameters | ||
---|---|---|
limit | int (optional) Ex: 10 | limit number of returned experience_group records |
Request
Headers
Authorization: {token}
Response 200
Body
{
"experience_groups": [
{
"account_id": "fake9bbad3f347be8ab37d771cc3aed0",
"aid": 111,
"child_groups": [
...
will include full nested experience group model here
---
],
"experiences": [
...
will include full nested experience model here
...
],
"class": "journey",
"created": "2019-05-20T19:23:35.101Z",
"generated_segments": {
"fixed": "933188e4a53708d819a7e29069115ce5",
"target": "abc188e4a53708d819a7e29069115ce5"
},
"id": "ef9154b3a5f982e1bd4ec0230664b57c",
"label": "Sample Journey",
"prioritization_id": "468ac999a5f2577ed33bf7e816fcd209",
"report_id": "samplereportid",
"segment_id": "f1ac0f11d355a29ad128218458129b0a",
"slug": "sample_journey",
"updated": "2019-05-20T19:23:35.313Z",
"user_id": "fake0d6d61f39b3f34024164c6597cd2"
}
],
"message": "success",
"status": 200
}
Fetch
Fetches an Experience Group record by id.
Parameters | ||
---|---|---|
id | string (required) Ex: ef9154b3a5f982e1bd4ec0230664b57c | id of the group |
Request
Headers
Authorization: {token}
Response 200
Body
{
"experience_group": {
"account_id": "fake9bbad3f347be8ab37d771cc3aed0",
"aid": 111,
"child_groups": [
...
will include full nested experience group model here
---
],
"experiences": [
...
will include full nested experience model here
...
],
"class": "journey",
"created": "2019-05-20T19:23:35.101Z",
"generated_segments": {
"fixed": "933188e4a53708d819a7e29069115ce5",
"target": "abc188e4a53708d819a7e29069115ce5"
},
"id": "ef9154b3a5f982e1bd4ec0230664b57c",
"label": "Sample Journey",
"prioritization_id": "468ac999a5f2577ed33bf7e816fcd209",
"report_id": "samplereportid",
"segment_id": "f1ac0f11d355a29ad128218458129b0a",
"slug": "sample_journey",
"updated": "2019-05-20T19:23:35.313Z",
"user_id": "fake0d6d61f39b3f34024164c6597cd2"
},
"message": "success",
"status": 200
}