Automatic Booking Association CFE
This CFE allows the user (logged in or guest) to automatically associate new bookings to his customer account.
Automatic Booking Association CFE
This CFE allows the user (logged in or guest) to automatically associate new bookings to his customer account.
Links
<!-- prettier-ignore-start --> | GitLab | https://source.tui/osp/customer/account/automatic-booking-association-cfe | | SIT Env | | | MFE Link | https://mwa-nonprod.tui.com/customer/mwa/tui-cfe-orchestration-bookings-account-test/index.html | | Manifest | https://mwa-nonprod.tui.com/customer/mwa/tui-cfe-orchestration-bookings-account-test/openmfe/manifest.yaml | | Docs | https://mwa-nonprod.tui.com/customer/mwa/tui-cfe-orchestration-bookings-account-test/openmfe/documentation.html | <!-- prettier-ignore-end -->
MFE Integration
This CFE will work shoulder to shoulder with Automatic Booking Association MFE. Please refer to MFE documentation as well.
Example html code:
<tui-automatic-booking-association-cfe
data-theme="tui-light"
locale="en-GB"
market="UK_TH"
source-market="VALUE"
source-market-region="VALUE"
lead-passenger-email="VALUE"
lead-passenger-first-name="VALUE"
lead-passenger-last-name="VALUE"
lead-passenger-gender="VALUE"
departure-date="VALUE"
product-type="VALUE"
booking-id="VALUE"
brand="VALUE"
booking-system-code="VALUE"
forgot-password-link="VALUE"
post-association-redirect-link="VALUE"
>
</tui-automatic-booking-association-cfe>
...
<script async type="module" src="https://mwa-nonprod.tui.com/customer/mwa/tui-cfe-orchestration-bookings-account-test/main.js"></script>
Lifecycle
graph TB
subgraph FE
onSubmitBooking[Submit form]-->validateForm[Validate form];
validateForm-->ifBookihgType{If BookingType is <br/> ATCOM or TRIPS};
ifBookihgType-->|No|sendBookingFailureEvent[Send add booking failure <br/> analitycs event]-->showAlternativeLink[Show alternative add booking link];
ifBookihgType-->|Yes|invokeAssociateBookingMutation[Invoke associateBooking Mutation];
end;
subgraph BFF
invokeAssociateBookingMutation-->|/graph|validateRequestBody[Validate request body]-->getUIDbyIdToken[Get UID by <br/> Gigya REST accounts.getJWTPublicKey];
getAllUserBooking-->ifBookingAlreadyExists{If booking <br/> already exists <br/> or not found}-->|No|associateBookings[Associate bookings APIGEE <br/> /v1/customerAccounts/$UID/associateBookings];
ifBookingTypeATCOM-->|Yes|getAtcomBooking[Get ATCOM booking <br/> /sales-display-booking/st3/package]-->verifyATCOMBooking[Verify ATCOM booking]-->getAllUserBooking;
getUIDbyIdToken-->ifBookingTypeTrips{If booking type is <br/> TRIPS}-->|No|ifBookingTypeATCOM{If booking type is <br/> ATCOM};
ifBookingTypeTrips-->|Yes|verifyBooking[Verify booking APIGEE <br/> /tui-sales-tda/tuiapiservices/salesorder/v1/verifybooking]-->getAllUserBooking[Get all user booking APIGEE <br/> /v1/customerAccounts/$UID/associateBookings];
end;
subgraph FE on response
ifBookingTypeATCOM-->|No|displayError[Display error message];
ifBookingAlreadyExists-->|Yes|displayError;
associateBookings-->sendAddBookingSuccessEvent[Send add booking success <br/> analitycs event]-->sendManualBookingAssociatedEvent[Send booking associated event <br/> tui-auto-booking-association-mfe-automatic-backend-booking-associated];
end;
Third party integration
Postman Collection:
https://confluence.tuigroup.com/pages/viewpage.action?spaceKey=ONEPF&title=CAS+-+Operations+with+Bookings+via+Postman
Request:
Method: GET
URL: https://tui-nonprod-test.apigee.net/v1/customerAccounts/${UID}/associateBookings
Headers:
Header | Description |
---|---|
correlation-id | Request ID |
Authorization | Apigee bearer token |
Request Path Parameters:
Param | Description |
---|---|
UID | Unique user id, received from Gigya JWT |
Response Booking Parameters:
Param | Description |
---|---|
sourcemarket | Market id, possible values: WR, NR, GASP |
sourcemarketCountryId | Country code: DE, PL, SE, etc. |
brand | Booking brand: TUI-FLY, VIP-BE, TUIFLY_MA, etc. |
bookingId | Unique booking id |
ownershipRole | User booking role: OWNER or GUEST |
associationMethod | Association booking method: AUTOMATIC, MANUAL, MATCHING |
initiatingChannel | Booking channel: TDA, SALES-WEBSITE, BOOKING-SYSTEM |
timestamp | Creation date |
packageType | Booking type: EXCURSION, FLIGHT, ACCOMMODATION, CRUISE, INSURANCE, etc. |
bookingType | Booking code: LEGACY, TRIPS |
airportCode | Airport code |
originalDepartureDate | Departure date |
originalReturnDate | Return date |
TUI Sales API Verify Bookings
Postman Collection:
https://confluence.tuigroup.com/pages/viewpage.action?spaceKey=ONEPF&title=CAS+-+Operations+with+Bookings+via+Postman
Customer Account API Associate Booking
This REST API endpoint uses for associating user to booking.
APIGEE:
https://apigee.com/platform/tui-nonprod/proxies/customer-group-customerAccount/overview/7
Postman Collection:
https://confluence.tuigroup.com/pages/viewpage.action?spaceKey=ONEPF&title=CAS+-+Operations+with+Bookings+via+Postman
Request:
Method: POST
URL: https://tui-nonprod-test.apigee.net/v1/customerAccounts/${UID}/associateBookings
Headers:
Header | Description |
---|---|
correlation-id | Request ID |
Authorization | Apigee bearer token |
Request Path Parameters:
Param | Description |
---|---|
UID | Unique user id, received from Gigya JWT |
Body Request Parameters:
Body request contains array of AssociateBooking
Associate Trips Booking Body
Param | Description |
---|---|
sourcemarket | Hardcode value: WR |
sourcemarketCountryId | Country code: DE, PL, SE, etc. |
brand | Booking brand: TUI-FLY, VIP-BE, TUIFLY_MA, etc. |
bookingId | Unique booking id |
ownershipRole | Hardcode value: OWNER |
associationMethod | Hardcode value: MANUAL |
packageType | Booking type: EXCURSION, FLIGHT, ACCOMMODATION, CRUISE, INSURANCE, etc. |
departureDate | Departure date |
returnDate | Return date |
Associate Atcom Booking Body
Param | Description |
---|---|
sourcemarket | Hardcode value: NR |
sourcemarketCountryId | Country code: DE, PL, SE, etc. |
brand | Booking brand: TUI-FLY, VIP-BE, TUIFLY_MA, etc. |
bookingId | Unique booking id |
ownershipRole | Hardcode value: OWNER |
associationMethod | Hardcode value: AUTOMATIC |
bookingType | Hardcode value: LEGACY |
initiatingChannel | Hardcode value: BOOKING_SYSTEM |
packageType | Booking type: EXCURSION, FLIGHT, ACCOMMODATION, CRUISE, INSURANCE, etc. |
departureDate | Departure date |
returnDate | Return date |
flightFrom | Localized airport name |
flightFromIataCode | Iata code |
flightTo | Localized airport name |
flightToIataCode | Iata code |
airportCode | Airport code |
airportName | Localized airport name |
Response
Param | Description |
---|---|
timestamp | Hardcode value: NR |
bookings | Array of associated bookings |
bookings.booking | Returns sended booking object |
bookings.code | Booking code |
bookings.message | Booking message |
ATCOM API Get Booking
This API endpoint uses for check if ATCOM booking exist. If booking does not exist API throws an error.
Request:
Method: POST
URL: https://test.api.tui/sales-display-booking/st3/package
Headers:
Header | Description |
---|---|
correlation-id | Request ID |
Authorization | Apigee bearer token |
Request Parameters:
Body wrapped in DisplayBookingRequest object.
Param | Description |
---|---|
Adm.ReqId | Colleation id |
CltInfo.Locale | Hadrcode value: en_EN |
CltInfo.CltSysContext | Hardcode value: 3 |
CltInfo.TermCode | Hardcode value: VTX |
CltInfo.User_Name | User name |
CltInfo.Exp_No | Hardcode value: WEB |
CltInfo.Chan | Hardcode value: 1100 |
CltInfo.User_Role | Hardcode value: INTERNAL |
BkgNum.BkgId | Booking reference |
Manifest contract
Screenshots
Usage
Add the following script tag to your web page to load the microfrontend. Note: This is required only once per webpage, even when you embed multiple instances of the microfrontend.
<script src="https://mwa-nonprod.tui.com/customer/mwa/tui-cfe-orchestration-bookings-account-test/main.js" defer></script>
Add the following HTML code anywhere in your webpage at the position where you want the microfrontend to show. You can create multiple instances of the microfrontend.
<tui-automatic-booking-association-cfe
data-theme="VALUE"
locale="VALUE"
market="VALUE"
source-market="VALUE"
source-market-region="VALUE"
booking-system-code="VALUE"
brand="VALUE"
booking-id="VALUE"
product-type="VALUE"
lead-passenger-email="VALUE"
first-name="VALUE"
last-name="VALUE"
gender="VALUE"
departure-date="VALUE"
forgot-password-link="VALUE"
post-association-redirect-link="VALUE">
</tui-automatic-booking-association-cfe>
Examples
Shows the ABBA CFE in English
<tui-automatic-booking-association-cfe
data-theme="tui-light"
locale="en-GB"
market="UK_TH"
source-market="GB"
source-market-region="NR"
booking-system-code="ATCOMRES"
brand="TUI_GB"
booking-id="1234567890"
product-type="ACCOMMODATION_ONLY"
lead-passenger-email="email@test.com"
first-name="John"
last-name="Doe"
gender="MALE"
departure-date="2024-12-31"
forgot-password-link="/myTUI/forgot-password/"
post-association-redirect-link="/myTUI/">
</tui-automatic-booking-association-cfe>
Attributes
This microfrontend accepts the following attributes:
Name | Description | Values | Default | Required |
---|---|---|---|---|
data-theme | This is the theme attribute that will be used to add the brand styles | tui , tui-light , firstchoice , musement | yes | |
locale | This is the attribute that will be used to render the CFE in a specific language | en-GB , nl-NL , nl-BE , fr-FR , sv-SE , nn-NO , nb-NO , da-DK , fi-FI | yes | |
is-b2b | This is the attribute that will be used to set the MFE in B2B mode, its using in case if auth integration layer url is not provided on the page | no | ||
market | This is the TUI market where the CFE will be consumed | UK , UK_TH , UK_FC , UK_FJ , NL , BE , BE_FO , FR_FO , MA_FO , SE , NO , DK , FI , DE , MM | yes | |
source-market | This is the TUI market where the booking was made | DE , PL , AT , CH , GB , IE , SE , DK , FI , NO , BE , NL , FR , MA , XX | yes | |
source-market-region | This is the region ID where the booking was made | CR , NR , WR , M3 , MM | yes | |
booking-system-code | This is the booking system to be used in association | ATCOMRES , ATCOMRESR1 , BIBE , CTS , JUMP , MDCAMPER , MDCAMPRJ , MDCAR , MDCARPRJ , MDINSPRJ , MDINSURE , MUSEMENT , NSKTF , TOR , TRIPS , TRS , UNKNOWN , VSN , WHEELS | yes | |
brand | This is the brand to be used in association | TUI_NL , TUI_BE , VIP_BE , TUIFLY_BE , TUIFLY_MA , TUIFLY_FR , TUIFLY_NL , TUI_GB , FIRSTCHOICE_GB , FIRSTCHOICE_NL , FIRSTCHOICE_BE , TUI_IE , TUI_SE , TUI_DK , TUI_NO , TUI_FI , TUI_DE , TUI_CH , TUI_AT , TUI_PL , CRYSTAL_GB , CRYSTAL_IE , TUI_XX , ROBINSON_DE , ROBINSON_GB , ROBINSON_XX , MAGICLIFE_DE , MAGICLIFE_GB , TUIBLUE_DE , TUIBLUE_GB , TUIBLUE_XX | yes | |
booking-id | This is the booking ID | yes | ||
product-type | This is the product type to be used in association | ACCOMMODATION_ONLY , CARHIRE , CRUISE , EXCURSION , FLIGHT_ONLY , FLY_AND_STAY , INSURANCE , MULTICENTRE , OTHER , SKI , TOURS | yes | |
lead-passenger-email | This is the email of the lead passenger | yes | ||
first-name | This is the attribute for lead passenger first name | yes | ||
last-name | This is the attribute for lead passenger last name | yes | ||
gender | This is the attribute for lead passenger gender | FEMALE , MALE , UNKNOWN | yes | |
departure-date | This is the booking's departure date | yes | ||
forgot-password-link | This is the link to the forgot password page | yes | ||
post-association-redirect-link | This is the url that user will be redirected to upon clicking on 'Go to myTUI account' button | yes |