Copy of How to setup the Global Ticket connection in the Customer Data Platform (CDP)
Imported from Guru. Original update on at 14:18:34 UTC
Goal
The goal of this article is to explain how to setup the connection between Global Ticket and the Customer Data Platform.
Product
Ticketing
Mobile Marketing Cloud
Customer Data Platform
Steps
Global Ticket is an CM integration of the Mobile Marketing Cloud, it can be sold and used in combination with a MMC Basic license, however it still needs to be connected manually by Professional Services. So an kickstart onboarding package is necessary for this.
Note: A historical sync is not possible for Global Ticket. So if customer wants to have historical data from Global Ticket (no older than 20 years is stored) in CDP, a manual export and import is needed.
Step 1:
Send TenantID and Producttoken to the CSM of Global Ticket to activate the connection.
Together with the following EventTypeIDs:
Customer Details: 4f8c4d94-14f8-480e-abcb-19f2df784aec
Order: 824ac1fa-cf76-4a28-9879-b1fe0d10b255
Scan: f556d00b-ba92-46bc-abfd-e8955e7dffb1
1. Global Ticket: Order
The Global Ticket: Order sessions consists out of the following four event types:
Global Ticket: Customer Details
Global Ticket: Order Details
Global Ticket: Ticket Sale
Global Ticket: Ticket Scan
Sessions are being used to group all events of a particular order, using OrderID as it's key variable. So above events are mapped to the Session "Global ticket: Order" instead of mapping to the main profile type. The Session Global Ticket: Order is mapped to the main profile type for showing up in profile insights.
1.1 Session: "Global Ticket: Order"
Step 1 is to add a new Profile Type via /rawsources in the CDP:
Profile Type Global Ticket: Order:
{
"id": "72aaafb1-84fc-43a6-a043-9fc6875c7143",
"isMain": false,
"name": "Global Ticket: Order",
"description": "-",
"properties": [
{
"id": "fbf2ecf6-dfb7-4e33-8575-7222dc6975aa",
"name": "Email",
"type": "email",
"possibleOriginTypes": [
"email",
"string"
],
"isKey": false,
"externalKey": null,
"isNotIndexed": false,
"maxOccurences": null,
"displayModel": {
"index": 0,
"isVisible": true
},
"operatorName": "",
"sourceEventTypeIds": [
"23a25c48-76ea-40f1-9a30-d0f0af6dddc3",
"2f37d7a5-b6a5-42be-a4aa-354c2e518fb2",
"337414a1-20f7-47a7-991f-dc64efc35460",
"df6c8d57-d7af-4aa4-816a-57b29d691ede"
],
"sourceProfileTypeIds": []
},
{
"id": "3fb1c1a8-a667-43a8-bebf-ffb46cc3a7fd",
"name": "First name",
"type": "string",
"possibleOriginTypes": [
"string",
"number",
"iso8601date",
"email",
"phonenumber",
"null",
"boolean",
"birthday"
],
"isKey": false,
"externalKey": null,
"isNotIndexed": false,
"maxOccurences": null,
"displayModel": {
"index": 6,
"isVisible": true
},
"operatorName": "",
"sourceEventTypeIds": [
"df6c8d57-d7af-4aa4-816a-57b29d691ede"
],
"sourceProfileTypeIds": []
},
{
"id": "c49831d0-bcd4-49c6-9197-5f028011a3fb",
"name": "Language",
"type": "string",
"possibleOriginTypes": [
"string",
"number",
"iso8601date",
"email",
"phonenumber",
"null",
"boolean",
"birthday"
],
"isKey": false,
"externalKey": null,
"isNotIndexed": false,
"maxOccurences": null,
"displayModel": {
"index": 4,
"isVisible": true
},
"operatorName": "",
"sourceEventTypeIds": [
"2f37d7a5-b6a5-42be-a4aa-354c2e518fb2"
],
"sourceProfileTypeIds": []
},
{
"id": "01639916-3646-4c3d-8e4f-6880ef7d8e02",
"name": "Last name",
"type": "string",
"possibleOriginTypes": [
"string",
"number",
"iso8601date",
"email",
"phonenumber",
"null",
"boolean",
"birthday"
],
"isKey": false,
"externalKey": null,
"isNotIndexed": false,
"maxOccurences": null,
"displayModel": {
"index": 7,
"isVisible": true
},
"operatorName": "",
"sourceEventTypeIds": [
"df6c8d57-d7af-4aa4-816a-57b29d691ede"
],
"sourceProfileTypeIds": []
},
{
"id": "412d2c98-1d2b-4c31-b728-6e2bbedcd9fc",
"name": "Location",
"type": "string",
"possibleOriginTypes": [
"string",
"number",
"iso8601date",
"email",
"phonenumber",
"null",
"boolean",
"birthday"
],
"isKey": false,
"externalKey": null,
"isNotIndexed": false,
"maxOccurences": null,
"displayModel": {
"index": 13,
"isVisible": true
},
"operatorName": null,
"sourceEventTypeIds": [],
"sourceProfileTypeIds": []
},
{
"id": "f4becdb3-4bb7-4680-bfea-311de160e1a0",
"name": "Mobile phonenumber",
"type": "phonenumber",
"possibleOriginTypes": [
"phonenumber",
"string"
],
"isKey": false,
"externalKey": null,
"isNotIndexed": false,
"maxOccurences": null,
"displayModel": {
"index": 8,
"isVisible": true
},
"operatorName": "",
"sourceEventTypeIds": [
"df6c8d57-d7af-4aa4-816a-57b29d691ede"
],
"sourceProfileTypeIds": []
},
{
"id": "f8d1c913-a567-4d01-968f-ca2b1a719689",
"name": "Order ID",
"type": "string",
"possibleOriginTypes": [
"string",
"number",
"iso8601date",
"email",
"phonenumber",
"null",
"boolean",
"birthday"
],
"isKey": true,
"externalKey": null,
"isNotIndexed": false,
"maxOccurences": null,
"displayModel": {
"index": 1,
"isVisible": true
},
"operatorName": "",
"sourceEventTypeIds": [
"23a25c48-76ea-40f1-9a30-d0f0af6dddc3",
"2f37d7a5-b6a5-42be-a4aa-354c2e518fb2",
"337414a1-20f7-47a7-991f-dc64efc35460",
"df6c8d57-d7af-4aa4-816a-57b29d691ede"
],
"sourceProfileTypeIds": []
},
{
"id": "1fcf17a0-3871-4e76-a8a4-1cc956bb03ca",
"name": "Ticket group name",
"type": "string",
"possibleOriginTypes": [
"string",
"number",
"iso8601date",
"email",
"phonenumber",
"null",
"boolean",
"birthday"
],
"isKey": false,
"externalKey": null,
"isNotIndexed": false,
"maxOccurences": null,
"displayModel": {
"index": 12,
"isVisible": true
},
"operatorName": null,
"sourceEventTypeIds": [],
"sourceProfileTypeIds": []
},
{
"id": "6e81c2bc-8e74-4632-98e4-d299a254475f",
"name": "Tickets scanned",
"type": "number",
"possibleOriginTypes": [
"number"
],
"isKey": false,
"externalKey": null,
"isNotIndexed": false,
"maxOccurences": null,
"displayModel": {
"index": 11,
"isVisible": true
},
"operatorName": "sum",
"sourceEventTypeIds": [
"337414a1-20f7-47a7-991f-dc64efc35460"
],
"sourceProfileTypeIds": []
},
{
"id": "6dda8b07-f9b1-4ade-98a6-6e498472a883",
"name": "Time Slot",
"type": "string",
"possibleOriginTypes": [
"string",
"number",
"iso8601date",
"email",
"phonenumber",
"null",
"boolean",
"birthday"
],
"isKey": false,
"externalKey": null,
"isNotIndexed": false,
"maxOccurences": null,
"displayModel": {
"index": 3,
"isVisible": true
},
"operatorName": "",
"sourceEventTypeIds": [
"2f37d7a5-b6a5-42be-a4aa-354c2e518fb2"
],
"sourceProfileTypeIds": []
},
{
"id": "dfa6b9ca-f9ca-4990-bd16-c0091bc1c1aa",
"name": "Time slot date",
"type": "string",
"possibleOriginTypes": [
"string",
"number",
"iso8601date",
"email",
"phonenumber",
"null",
"boolean",
"birthday"
],
"isKey": false,
"externalKey": null,
"isNotIndexed": false,
"maxOccurences": null,
"displayModel": {
"index": 9,
"isVisible": true
},
"operatorName": "",
"sourceEventTypeIds": [
"2f37d7a5-b6a5-42be-a4aa-354c2e518fb2"
],
"sourceProfileTypeIds": []
},
{
"id": "72897b4e-0ffe-426b-8b67-f0809cc3ad75",
"name": "Time slot time",
"type": "string",
"possibleOriginTypes": [
"string",
"number",
"iso8601date",
"email",
"phonenumber",
"null",
"boolean",
"birthday"
],
"isKey": false,
"externalKey": null,
"isNotIndexed": false,
"maxOccurences": null,
"displayModel": {
"index": 10,
"isVisible": true
},
"operatorName": "",
"sourceEventTypeIds": [
"2f37d7a5-b6a5-42be-a4aa-354c2e518fb2"
],
"sourceProfileTypeIds": []
},
{
"id": "e38ad2ae-4f35-4176-9481-6e6d8e126788",
"name": "Total price",
"type": "number",
"possibleOriginTypes": [
"number"
],
"isKey": false,
"externalKey": null,
"isNotIndexed": false,
"maxOccurences": null,
"displayModel": {
"index": 5,
"isVisible": true
},
"operatorName": "",
"sourceEventTypeIds": [
"2f37d7a5-b6a5-42be-a4aa-354c2e518fb2"
],
"sourceProfileTypeIds": []
},
{
"id": "a0f8c0ff-6cea-4125-8027-31d8595b5f67",
"name": "Total tickets",
"type": "number",
"possibleOriginTypes": [
"number"
],
"isKey": false,
"externalKey": null,
"isNotIndexed": false,
"maxOccurences": null,
"displayModel": {
"index": 2,
"isVisible": true
},
"operatorName": "",
"sourceEventTypeIds": [
"2f37d7a5-b6a5-42be-a4aa-354c2e518fb2"
],
"sourceProfileTypeIds": []
}
]
}
Next step is to add the mapping of the Profile type "Global Ticket: Order" to the Main Profile type:
Mapping (Global Ticket: Order → Profile)
Email -> Email
First name -> First name
Language -> Language
Last name -> Last name
Mobile phonenumber -> Mobile phonenumber
1.2 Event type: "Global Ticket: Customer Details"
First step is to add the Raw Input eventtype to eventtypes via /rawsources in the CDP.
Raw Input Eventtype:
{
"id": "4f8c4d94-14f8-480e-abcb-19f2df784aec",
"name": "Global Ticket: Customer Details (raw)",
"properties": [
{
"id": "c704a196-ff66-429a-980f-907cf9ee47cb",
"name": "Email",
"priority": 0,
"type": "email",
"isOptional": true,
"isNotIndexed": false
}
]
}
Second step is to add the output eventtype to eventtypes in /rawsources:
{
"id": "df6c8d57-d7af-4aa4-816a-57b29d691ede",
"name": "Global Ticket: Customer Details",
"properties": [
{
"id": "c2e99100-8ece-4195-b8a1-4dd254cabdb1",
"name": "Email",
"priority": 0,
"type": "email",
"isOptional": false,
"isNotIndexed": false
},
{
"id": "41203cc7-30bd-4424-94d9-fca04c695d64",
"name": "First name",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "21988a02-aee8-4024-a78e-2dd1783ef235",
"name": "Insertions",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "7cdbe6a1-4b50-4f86-8247-24200a6a960c",
"name": "Last name",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "a6243168-aefd-4d3c-9140-77cf1a116ab2",
"name": "Mobile Phonenumber",
"priority": 0,
"type": "phonenumber",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "2e7a8cc0-0b26-4089-b623-2eb9428d421f",
"name": "Order ID",
"priority": 0,
"type": "string",
"isOptional": false,
"isNotIndexed": false
}
]
}
Third step is to add the mapping of this event. Important is that this event is mapped to the Global Ticket Order profile type instead of mapping to the main profile type.
Mapping (Global Ticket: Customer Details → Global Ticket: Order)
Email -> Email
First name -> First name
Last name -> Last name
Mobile Phonenumber -> Mobile phonenumber
Order ID -> Order ID
Fourth step is to add the script for transforming the raw input data into the output eventtype
Script
// Customer Details
function transform(inputEvent) {
emitEvent(
'df6c8d57-d7af-4aa4-816a-57b29d691ede',
{
"Order ID": inputEvent["Order Id"],
"First name": inputEvent["First name"],
"Last name": inputEvent["Last Name"],
"Insertions": inputEvent["Insertions"],
"Email": inputEvent["Email Address"],
"Mobile Phonenumber": fixPhoneNumber(inputEvent['Mobile Phone'], 'NL').phoneNumber,
}
);
}
Always use a raw event from the IPL to test the script. If not yet present in IPL, use a raw event from another GT/CDP customer to test your script and make sure it works.
1.3 Input Event type: "Global Ticket: Order"
First step is to add the Raw Input eventtype to eventtypes via /rawsources in the CDP.
Raw Input Eventtype:
{
"id": "824ac1fa-cf76-4a28-9879-b1fe0d10b255",
"name": "Global Ticket: Ticket Order (raw)",
"properties": [
{
"id": "cd040118-180a-4921-abbf-233a94cd5143",
"name": "Email",
"priority": 0,
"type": "email",
"isOptional": true,
"isNotIndexed": false
}
]
}
1.3.1 Output event type: Order Details
Create the event type Order Details in /rawsources:
{
"id": "2f37d7a5-b6a5-42be-a4aa-354c2e518fb2",
"name": "Global Ticket: Order Details",
"properties": [
{
"id": "1424adf1-e7de-49c1-a00b-50da9f99bad5",
"name": "DateofEvent",
"priority": 0,
"type": "iso8601date",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "94194680-a4c8-4e9f-bef9-70e315b4e29d",
"name": "Email",
"priority": 0,
"type": "email",
"isOptional": false,
"isNotIndexed": false
},
{
"id": "7d712ead-c673-4d92-b830-6261bfec0cdb",
"name": "Gift Card",
"priority": 0,
"type": "boolean",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "1419b11c-c375-45f9-a356-73f00d6150a7",
"name": "Language",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "737f091d-65d8-4db3-bb88-d79eecec55de",
"name": "Optin",
"priority": 0,
"type": "boolean",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "2bc702f5-774a-4aab-81c0-ffdb256abb12",
"name": "Optin 2",
"priority": 0,
"type": "boolean",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "bb3ce23e-1260-4bcf-8284-3b8b56ed7c17",
"name": "Optin Terms and Conditions",
"priority": 0,
"type": "boolean",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "fe259aec-57d4-40f2-8605-10ea49df9f51",
"name": "Order Discount",
"priority": 0,
"type": "number",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "388b3a6c-4536-4da9-bd10-2ded655d4f60",
"name": "Order Discount Used",
"priority": 0,
"type": "boolean",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "731273ef-a43e-4778-b88b-bcb01f302a1d",
"name": "Order Donation",
"priority": 0,
"type": "boolean",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "2cd2b2bb-824d-4a24-845b-250d8ba69a1a",
"name": "Order Donation Price",
"priority": 0,
"type": "number",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "29906efe-5be6-40f3-8d8a-92c6a73cdb55",
"name": "Order ID",
"priority": 0,
"type": "string",
"isOptional": false,
"isNotIndexed": false
},
{
"id": "7b7b15ec-9e35-4790-a542-90930591b067",
"name": "Ticketshop URL",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "31676fe9-5fe9-4ab4-9352-64048d8caf23",
"name": "Time Slot",
"priority": 0,
"type": "iso8601date",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "b4fbdef9-3e78-42ce-823c-fb64e10f673a",
"name": "Time Slot Date",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "89d8ed29-cc07-4b24-b20b-01afcebbc2f9",
"name": "Time Slot Time",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "62afaf69-15d0-46b2-9127-32f977f21339",
"name": "Total Price",
"priority": 0,
"type": "number",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "37ae9bac-911c-4c97-b7b6-23bccaf9e18e",
"name": "Total Tickets",
"priority": 0,
"type": "number",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "0626f797-bb26-4a34-ba3b-0df6860bc0ad",
"name": "User Agent",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
}
]
}
And add the following Mapping for this Order Details eventtype. Important: Map it to the Session Global Ticket: Order, not to the Main profile type
(Global Ticket: Order Details → Global Ticket: Order)
Email -> Email
Language -> Language
Order ID -> Order ID
Time Slot -> Time Slot
Time Slot Date -> Time slot date
Time Slot Time -> Time slot time
Total Price -> Total price
Total Tickets -> Total tickets
1.3.2 Output Event type: "Global Ticket: Ticket Sale"
Create the event type Ticket Sale in /rawsources:
{
"id": "23a25c48-76ea-40f1-9a30-d0f0af6dddc3",
"name": "Global Ticket: Ticket Sale",
"properties": [
{
"id": "6fd8acb6-4ea0-4e2b-b03a-7087bdfeb4ed",
"name": "DateOfEvent",
"priority": 0,
"type": "iso8601date",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "6a7eb1b9-0445-4b5e-b966-e2e0becbafd2",
"name": "Email",
"priority": 0,
"type": "email",
"isOptional": false,
"isNotIndexed": false
},
{
"id": "560cc681-9b59-4f80-a327-0c37ed991a5f",
"name": "Order ID",
"priority": 0,
"type": "string",
"isOptional": false,
"isNotIndexed": false
},
{
"id": "43e8015f-afa4-4c86-acfd-90674c9fc308",
"name": "Ticket Barcode",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "7f20300e-9bc6-4c06-9df9-c59b8442ea7e",
"name": "Ticket Group Id",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "922598e5-4566-4628-ae87-8822c2f3143e",
"name": "Ticket Group Name",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "499ac7ea-ad66-4c5d-b825-9d2dcb5c5280",
"name": "Ticket Price",
"priority": 0,
"type": "number",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "ae6c0a7d-8caa-4160-acf7-ffba63e50be6",
"name": "Ticket Type Id",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "bce94a15-e5d9-47eb-97f9-ca5de4e6418e",
"name": "Ticket Type Name",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "2f7bbada-32b2-43dd-83da-6f6d961fc5ed",
"name": "Time Slot",
"priority": 0,
"type": "iso8601date",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "70f6f90a-cc70-43a5-8bf8-a733124c4037",
"name": "Time Slot Date",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "8b34d6d7-10f3-494d-abe5-2776acfc5fba",
"name": "Time Slot Time",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
}
]
}
Mapping (Global Ticket: Ticket Sale → Global Ticket: Order)
Email -> Email
Order ID -> Order ID
1.3.3 Script Orders
Script "Global Ticket: Ticket Order raw to Order Details + Ticket Sale + Consent"
function transform(inputEvent) {
if (inputEvent["Tickets Date"] != ""){
var TimeSlot = inputEvent["Tickets Date"]+" "+inputEvent["Tickets Time Slot"];
}
//Order Details
emitEvent('2f37d7a5-b6a5-42be-a4aa-354c2e518fb2',
{
"Language": inputEvent["Language"],
"Order ID": inputEvent["Order Id"],
"Gift Card": inputEvent["Gift Card"],
"User Agent": inputEvent["User Agent"],
"Total Price": inputEvent["Order Price"],
"Time Slot": TimeSlot,
"Email": inputEvent["Email Address"],
"Total Tickets": inputEvent["Total Tickets"],
"Order Discount": inputEvent["Order Discount"],
"Order Donation": inputEvent["Order Donation"],
"Optin": inputEvent["Opt in Newsletter"],
"Ticketshop URL": inputEvent["Ticket street URL"],
"Order Discount Used": inputEvent["Order Discount Used"],
"Order Donation Price": inputEvent["Order Donation Price"],
"DateOfEvent": inputEvent["Tickets Purchase Date"]+" "+inputEvent["Tickets Purchase time"],
"Optin Terms and Conditions": inputEvent["Opt In Terms & conditions"],
"Time Slot Date": inputEvent["Tickets Date"],
"Time Slot Time": inputEvent["Tickets Time Slot"],
}
);
//Ticket Sale
inputEvent.tickets.forEach(tickets => {
emitEvent("23a25c48-76ea-40f1-9a30-d0f0af6dddc3",
{
"Email": inputEvent["Email Address"],
"Order ID": inputEvent["Order Id"],
"Ticket Price": tickets["Ticket Price"],
"Ticket Barcode": tickets["Ticket Barcode"],
"Ticket Type Id": tickets["Ticket Type Id"],
"Ticket Group Id": tickets["Ticket Group Id"],
"Ticket Type Name": tickets["Ticket Type Name"],
"Ticket Group Name": tickets["Ticket Group Name"],
"Time Slot": TimeSlot,
"DateOfEvent": inputEvent["Tickets Purchase Date"]+" "+inputEvent["Tickets Purchase time"],
"Time Slot Date": inputEvent["Tickets Date"],
"Time Slot Time": inputEvent["Tickets Time Slot"],
}
)
});
// consent
if(inputEvent["Opt in Newsletter"] == true ){
var marketingConsent = {
"Email": inputEvent["Email Address"],
"ConsentLocation": "https://tickets.doloris.nl/en/personal-details",
"ConsentText": "I would like to receive the newsletter of Doloris.",
"ConsentValue": 1,
"DateOfEvent": inputEvent["Tickets Purchase Date"]+" "+inputEvent["Tickets Purchase time"],
}
emitEvent("e17fb62f-4f6e-44b7-92b4-8f85ce3b609c", marketingConsent);
}
}
1.5 Event type: "Global Ticket: Ticket Scan"
1.5.1 Input eventtype "Ticket Scan"
Create the event type Ticket scan (Raw) in /rawsources:
{
"id": "f556d00b-ba92-46bc-abfd-e8955e7dffb1",
"name": "Global Ticket: Ticket Scan (raw)",
"properties": [
{
"id": "41241c3d-d813-4add-aab1-48395dfd3731",
"name": "Email",
"priority": 0,
"type": "email",
"isOptional": true,
"isNotIndexed": false
}
]
}
1.5.2 OUTPUT eventtype "Ticket Scan"
Create the Output event type Ticket scan in /rawsources:
{
"id": "337414a1-20f7-47a7-991f-dc64efc35460",
"name": "Global Ticket: Ticket Scan",
"properties": [
{
"id": "3de7ee72-f5a7-40c3-b465-3d4be455da71",
"name": "DateOfEvent",
"priority": 0,
"type": "iso8601date",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "ca754cfc-0c4f-474c-8295-7663f757f80e",
"name": "Email Address",
"priority": 0,
"type": "string",
"isOptional": false,
"isNotIndexed": false
},
{
"id": "030ab3bc-092e-43c3-a2ad-20c9ca97b6e9",
"name": "Order Id",
"priority": 0,
"type": "number",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "556b4476-c53b-43d9-a79e-0a8431e4e084",
"name": "Status",
"priority": 0,
"type": "number",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "dddb5c09-7410-42df-9012-7a111cac88fb",
"name": "Ticket check-in",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "0d76a24b-0add-41d1-aeb4-66a80d2b6ce7",
"name": "Ticket group title",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "208d8224-5fc6-4680-a9ee-e6739785f300",
"name": "Ticket language",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "d077014f-88bd-4b64-b30f-ce924a84956c",
"name": "Ticket order name",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "0245825f-77c7-4686-a1db-8ceb971e281c",
"name": "Ticket price",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
},
{
"id": "1d046f9f-3b69-43e5-ab1c-54cf3c553a7b",
"name": "Time of event",
"priority": 0,
"type": "string",
"isOptional": true,
"isNotIndexed": false
}
]
}
1.5.3 SCRIPT "Ticket Scan"
Add the script for transforming input event to output event:
// Ticket Scan
function transform(inputEvent) {
emitEvent(
'337414a1-20f7-47a7-991f-dc64efc35460',
{
'Email Address': inputEvent['Ticket order email'],
'Order Id': inputEvent['Order Id'],
'Ticket price': inputEvent['Ticket price'],
'DateOfEvent': inputEvent['Date of event'],
'Time of event': inputEvent['Time of event'],
'Ticket check-in': inputEvent['Ticket check-in'],
'Ticket language': inputEvent['Ticket language'],
'Ticket order name': inputEvent['Ticket order name'],
'Ticket group title': inputEvent['Ticket group title'],
"Status": 1
}
);
}
1.5.4 Mapping "Ticket Scan"
Add the mapping to map the event to the SESSION OF "Global Ticket: Order" (Do not map to profile)
Email Address -> Email
Order Id -> Order ID
Status -sum> Tickets scanned