I’m trying to add more data to my Wix Booking Services by creating a custom data collection with a multi-reference field.
I know the Wix Booking API is limited and the data collection is read-only, but by creating a multi-reference field in my custom collection the 2 collections have been linked.
Everything is working up until I try and call the reference field data from my page code.
While the referenced collection is showing in the booking services content manager, the field key doesn’t appear in the page code JSON.
{
"_id": "5f59643e-b8e1-4016-8c0c-4b90e0384535",
"serviceName": "CBF101B",
"description": "Abbotsford",
"tagLine": "Campbell River",
"serviceType": "CLASS",
"slug": "cbf101b",
"bookingsFlowEntryUrl": "/bookings-checkout/cbf101b/book",
"servicePageUrl": "/service-page/cbf101b",
"paymentType": "FREE",
"priceAmount": 0,
"depositAmount": 0,
"form": {
"fields": [
{
"_id": "e36f6e0f-198a-413f-821b-34b3b3b58808",
"type": "email",
"label": "Email",
"link": null,
"constraints": {
"required": true
}
},
{
"_id": "10d924a4-9155-4022-ae66-b8dae9123f92",
"type": "tel",
"label": "Phone Number",
"link": null,
"constraints": {}
},
{
"_id": "cbfa6ee2-e43b-445b-b579-d38650531031",
"type": "text",
"label": "Name",
"link": null,
"constraints": {
"required": true
}
},
{
"_id": "132c844e-a6d0-4d45-8957-458e07e839f1",
"type": "text",
"label": "Add Your Message",
"link": null,
"constraints": {}
}
]
},
"partOfPricingPlan": false,
"maxSessionCapacity": 6,
"maxNumberOfParticipantsPerReservation": 6,
"requiresApproval": false
}
My page code for the repeater data
// Setup each item in the slot repeater as it is loaded.
export function slotRepeater_itemReady($item, itemData, index) {
// Get the services price from the global services map using the items price
const slotPrice = servicesMap[itemData.serviceId].AdditionalSession.baseFare
// Populate the item's display fields.
$item("#slotPrice").text = slotPrice;
}
The error
Please help.