The integration between Heyloyalty and Tourpaq makes it possible to automatically transfer members as well as booking and travel data from Tourpaq to Heyloyalty.
The integration is developed by Tourpaq and automatically synchronizes data once a day.
How the synchronization works
Every night, the integration retrieves the orders and bookings in Tourpaq that have been created or updated since the last synchronization.
The data is used for two purposes in Heyloyalty:
- Creating and updating members who have given permission to receive newsletters.
- Creating and updating tracking data with information about the customer's booking and trip.
Members
A customer is imported as a member in Heyloyalty if the customer is subscribed to the newsletter in Tourpaq.
This is determined based on the field:
customersInfo[0].newsLetter = true
When the condition is met, the following data is transferred:
| Heyloyalty field | Tourpaq field | Description |
|---|---|---|
email | customersInfo[0].email | The customer's email address |
firstname | customersInfo[0].firstName | The customer's first name |
lastname | customersInfo[0].lastName | The customer's last name |
source | – | Always set to TourPaq |
permission_date | bookingInfo.bookingDate | The booking date is used as the permission date |
Booking and tracking data
The integration also transfers information about the customer's booking to Heyloyalty as tracking data.
The following fields are used:
| Tracking field | Tourpaq field | Description |
|---|---|---|
email | customersInfo[0].email | The customer's email address |
booking_id | bookingInfo.bookingId | The booking ID |
arrivalname | generalInfo.arrivalName | Name of the arrival/destination |
booking_date | bookingInfo.bookingDate | Date of the booking |
countryname | generalInfo.countryName | Country |
departureairport | generalInfo.iataDeparture | IATA code of the departure airport |
departure_date | bookingInfo.departureDate | Departure date |
duration | Calculated field | Number of days between departureDate and returnDate |
hotelcode | generalInfo.hotelCode | The hotel's code |
resortname | generalInfo.resortName | Resort/destination |
return_date | bookingInfo.returnDate | Return date |
roomtype | roomsInfo[0].code | The code of the first room in the booking |
salesperson | bookingInfo.salesPerson | Salesperson linked to the booking |
status | bookingInfo.cancelled | The booking's status |
Booking status
The status field is calculated from the value of bookingInfo.cancelled.
When:
bookingInfo.cancelled = false
the following is saved:
status = bought
When:
bookingInfo.cancelled = true
the following is saved:
status = cancelled
Since the integration retrieves bookings every night that have been updated since the last synchronization, a previously imported booking can, for example, change from bought to cancelled.
Special custom fields
The integration can contain a number of fields that are linked to special codes from Tourpaq. These will be custom fields, meaning fields unique to the individual customer.
The exact mapping between Tourpaq's codes and these fields is customer-specific. If you use them, they must be documented for your specific use case
Summary
The Tourpaq integration automatically ensures that relevant members and their booking data are transferred to Heyloyalty.
The synchronization happens once a day and covers new or changed bookings since the last synchronization. Customers with newsLetter = true can be imported as members, while the booking information is saved as tracking data and can be updated continuously, for example if a booking is cancelled.