Explore Experience programs
Experience Programs are fundamental data structures that support various products and services. For example, they define data schemas that map program-specific feedback data into new tables, which Total Experience profiles then use to accelerate data processing. Experience Programs also support Query API applications by providing a referential data schema that allows automating subsequent feedback extraction.
Experience programs and their schemas available in your instance, including both Enterprise and Ad Hoc types, through the programs operation.
Example: Exploring Experience programs
query experiencePrograms {
programs(
first: 3
){
nodes {
name
id
createdBy
createdOn
description
status
responsesCount
type
}
}
}Sample response
{
"data": {
"programs": {
"nodes": [
{
"name": "Contact Center transactional agent interaction",
"id": "6688cde1-3d7f-4486-b9ec-076c73d51364",
"createdBy": "_medallia_system_test",
"createdOn": "2021-07-23 04:57:02",
"description": "Program: Contact Center transactional agent interaction. Created by Merlin Spell",
"status": "ACTIVE",
"responsesCount": 2447,
"type": "ENTERPRISE"
},
{
"name": "Retail Store e-receipt",
"id": "9a3317f9-dc77-4430-bced-b35d976d1d31",
"createdBy": "_medallia_system_test",
"createdOn": "2021-07-23 04:56:07",
"description": "Program: Retail Store e-receipt. Created by Merlin Spell",
"status": "ACTIVE",
"responsesCount": 73610,
"type": "ENTERPRISE"
},
{
"name": "Wealth Management Client Onboarding",
"id": "abbb51a8-7792-4c41-b731-c873b492dd72",
"createdBy": "_medallia_system_test",
"createdOn": "2021-07-23 04:56:56",
"description": "Program: Wealth Management Client Onboarding. Created by Merlin Spell",
"status": "ACTIVE",
"responsesCount": 890,
"type": "ENTERPRISE"
}
]
}
},
"errors": null,
"_links": null,
"_allowed": [
"POST"
]
}Example: Exploring Experience program schemas using the fields operation
query experienceProgramSchemas {
programs(
first: 3
) {
totalCount
nodes {
name
id
fields(first: 3) {
totalCount
nodes {
id
name
dataType
}
}
}
}
}Sample response
{
"data": {
"programs": {
"nodes": [
{
"name": "B2B Onboarding program",
"id": "ea891440-f715-43dd-a275-44cbd353dae9",
"fields": {
"totalCount": 57,
"nodes": [
{
"id": "q_bp_b2b_ltr_scale",
"name": "Likelihood to Recommend",
"dataType": "ENUM"
},
{
"id": "e_email",
"name": "Email",
"dataType": "EMAIL"
},
{
"id": "e_bp_uniquerecordid_txt",
"name": "Unique Record Id",
"dataType": "STRING"
}
]
}
},
{
"name": "B2B Onsite Service program",
"id": "cdf759c8-3bef-4c13-afca-159fb8bcc750",
"fields": {
"totalCount": 42,
"nodes": [
{
"id": "q_bp_svc_ltr_scale",
"name": "Likelihood to Recommend Service",
"dataType": "ENUM"
},
{
"id": "e_phone",
"name": "Phone",
"dataType": "STRING"
},
{
"id": "e_bp_uniquerecordid_txt",
"name": "Unique Record Id",
"dataType": "STRING"
}
]
}
},
{
"name": "B2B Project program",
"id": "3d69e34d-1eb6-458a-a726-53826937eab5",
"fields": {
"totalCount": 17,
"nodes": [
{
"id": "q_bp_proj_ltr_scale",
"name": "Likelihood to Recommend Project",
"dataType": "ENUM"
},
{
"id": "e_firstname",
"name": "First name",
"dataType": "STRING"
},
{
"id": "e_bp_uniquerecordid_txt",
"name": "Unique Record Id",
"dataType": "STRING"
}
]
}
}
]
}
},
"errors": null,
"_links": null,
"_allowed": [
"POST"
]
}Filters and pagination for programs
Use a filter like the one shown below to get all data fields for a specific program. By defining the parameter first on the internal fields operation — and not on the programs — you get the data of all fields.
query experienceProgramSchema {
programs(
ids: "51c1a508-cf61-4be7-901c-87f3989ab7e1"
) {
nodes {
name
id
fields(
first: 300
after: null,
) {
nodes {
id
name
type
}
pageInfo {
endCursor
hasNextPage
}
totalCount
}
}
}
}The endCursor returned in the previous response should be added as part of the pagination of the fields in the next query. For example, if the response contains the following pagination information:
[...]
"pageInfo": {
"hasNextPage": true,
"endCursor": "xWSJSCIGh9+8WBydu4cOW5xdK9Q"
}
[...]
The programs query to get the next set of data looks like this:
query experienceProgramSchema {
programs(
ids: "51c1a508-cf61-4be7-901c-87f3989ab7e1"
) {
nodes {
name
id
fields(
first: 300
after: "xWSJSCIGh9+8WBydu4cOW5xdK9Q",
) {
nodes {
id
name
type
}
pageInfo {
endCursor
hasNextPage
}
totalCount
}
}
}
}
The query below is used to get the first 50 Experience programs and the first 50 fields for each program.
query experienceProgramSchemas {
programs(
first: 50,
after: null
) {
totalCount
pageInfo {
endCursor
hasNextPage
}
nodes {
name
id
fields(
first: 50,
after: null
) {
totalCount
nodes {
id
name
dataType
}
}
}
}
}The next query below has additional pagination elements, it fetches the first 50 Experience programs and the first 100 fields for each program.
query experienceProgramSchemas {
programs(
first: 50,
after: null
) {
totalCount
pageInfo {
endCursor
hasNextPage
}
nodes {
name
id
fields(
first: 100,
after: null
) {
totalCount
nodes {
id
name
dataType
}
}
}
}
}