Optional Extras
Many FAB flight suppliers support optional extras (aka services/ancillaries).
This page provides examples and advice on how to use optional extras.
Tip
For seat selection see this page.Viewing available extras
To view the extras available for selection check FAB_BasketRS Itinerary/ItineraryOptions/OptionalExtra[*]
An example OptionalExtra:
<OptionalExtra ID="LUG" Direction="outbound" Description="Outbound Bag (22kg)" Code="LUG" Supplier="JT2" FPC="supplement.pax.baggage.1" Type="Baggage" QuantityAvailable="20" UnitCost="34.0" CurrencyCode="GBP" ApplyTo="SelectedPax"/>
Key attributes
Check FAB_BasketRS reference page for full definitions.
Direction- whether the extra applies only to a specific direction of the itinerary componentDescription- a text description of the extra, generally in EnglishCode- used for selectionSupplier- which supplier the extra applies toFPC- helps identify the type of extraType- helps identify the type of extraQuantityAvailable- how many of the extra can be selected in totalUnitCost- cost per unit of the extraCurrencyCode- currency of theUnitCostApplyTo- indicates how the extra applies. E.g does it apply per passenger (SelectedPax) or to the whole party (AllPax)?AllPaxis most common with check-in options where the airline may require the passengers to all check-in with the same method (online vs airport)
ComponentId- indicates that the extra applies to a specific component of the basket (not shown in the above snippet, only present for multi-component flight baskets)
Selecting extras
To select an extra include it in your FAB_BasketRQ/CreateBasketRequest or FAB_BasketRQ/AmendBasketRequest.
An extra would look like so:
<OptionalExtra Direction="outbound" Code="LUG" Supplier="JT2" Quantity="1"/>
Key attributes
Check FAB_BasketRS reference page for full definitions.
Direction- must be set only if it was set on the respective responseOptionalExtraCode- must be set. Based on the respective responseOptionalExtraSupplier- must be set. Based on the respective responseOptionalExtraQuantity- must be set. Set to how manyOptionalExtraunits you want.- Set to
0to deselect
- Set to
ComponentId- must be set only if it was set on the respective responseOptionalExtra
How you “include” the extra varies by your selection method.
You have two methods to choose from:
Per passenger selection
To assign an extra to a specific passenger you list the extra against the customer, e.g:
<PassengerDetails>
<LeadCustomer ...>
<OptionalExtras>
<OptionalExtra Direction="outbound" Code="LUG" Supplier="JT2" Quantity="1"/>
</OptionalExtras>
</LeadCustomer>
<Customer ...>
<OptionalExtras>
<OptionalExtra Direction="outbound" Code="LUG" Supplier="JT2" Quantity="1"/>
</OptionalExtras>
</Customer>
</PassengerDetails>
Note
You cannot assign extras to infant passengers.Note:
- This type of selection only works where
PassengerDetailsis being provided. If you don’t know enough details (e.g names) at this stage of the flow you have two options:- Provide dummy details (e.g names) which you replace later in the flow
- or use “Itinerary selection” instead and switch to (i.e deselect from itinerary and reselect with passengers) “Per passenger selection” later in the flow
- If the supplier integration doesn’t support per passenger selection the extras will be spread over the passengers in the background
- E.g if for a 2 pax party you select 0 bags for “Tom” and 2 bags for “Sarah” the PNR with the airline may have 1 bag for “Tom” and 1 bag for “Sarah”
- If
OptionalExtra@ApplyToequalsAllPaxinFAB_BasketRSthen that extra will be applied to all passengers in the background
Itinerary selection
To assign an extra to that itinerary you list the extra in one of two places, depending whether you are making an AmendBasketRequest or a CreateBasketRequest.
AmendBasketRequest:
<AmendBasketRequest ...>
<AmendOptionalExtras>
<OptionalExtra Direction="outbound" Code="LUG" Supplier="JT2" Quantity="1"/>
</AmendOptionalExtras>
CreateBasketRequest:
<CreateBasketRequest ...>
<Itinerary ...>
<OptionalExtras>
<OptionalExtra Direction="outbound" Code="LUG" Supplier="JT2" Quantity="1"/>
</OptionalExtras>
Note:
- If
OptionalExtra@ApplyToequalsSelectedPaxinFAB_BasketRSthen that extra will be applied to specific passengers in the background based onQuantitybut you do not have control over which passengers.- E.g if for a 2 pax party of “Tom” and “Sarah” you select 1 bag, the PNR with the airline may have 1 bag for “Tom” or it may have 1 bag for “Sarah”
Tip
You can combine “Itinerary selection” and “Per passenger selection” in the sameFAB_BasketRQ, though this is generally avoided for simplicity.Viewing selected extras
To view selected extras check the following FAB_BasketRS elements:
Itinerary/OptionalExtras- for extras assigned to the itineraryPassengerDetails/LeadCustomer/OptionalExtras- for extras assigned to the lead customer/passengerPassengerDetails/Customer[*]/OptionalExtras- for extras assigned to a specific (non-lead) customer/passenger
Note
It is best practice to always check all three locations as in some scenarios extras may be automatically selected for you.Example for (1):
<CurrentBasket ...>
<Itinerary ...>
<OptionalExtras>
<OptionalExtra Direction="outbound" Code="LUG" Supplier="JT2" Quantity="1"/>
Displaying extras to your customer
With the above sections in mind, here are some tips for displaying extras to your customer:
- If you find the
Descriptionunsuitable you should use your own description and map it toSupplier+Code- We highly recommend that this mapping is configurable so that you can quickly support any new extras or suppliers
- Similarly
Typecan be useful for categorising extras though if your find it too high level you can map toSupplier+Code- We highly recommend that this mapping is configurable so that you can quickly support any new extras or suppliers
- To display the quantity available you may wish to use
QuantityAvailablethen dynamically subtract the quantity that have been selected on your frontend - You’ll likely need to surface the information from
DirectionandApplyToto your customer- E.g inform or show them that an extra applies in a specific manner
Optional Extra Group Rules
FAB_BasketRS will often contain OptionalExtraGroupRule elements. These provide information on how extras can be combined. By correctly implementing support for these rules you can reduce the number of failed basket costings you encounter.
Check FAB_BasketRS reference page for full definitions.
Here are two common examples:
Example 1
<OptionalExtraGroupRule RuleCode="OneOf" Supplier="JT2">
<ID Direction="outbound">APC</ID>
<ID Direction="outbound">OLC</ID>
</OptionalExtraGroupRule>
<OptionalExtraGroupRule RuleCode="OneOf" Supplier="JT2">
<ID Direction="homebound">APC</ID>
<ID Direction="homebound">OLC</ID>
</OptionalExtraGroupRule>
- These rules informs you that choosing a type of check-in is mandatory for JT2.
- And that you can only choose one type per direction
- And that your choice cannot differ by passenger
- Which makes sense as
ApplyTofor these extras was set asAllPax(not shown in this example snippet)
- Which makes sense as
Example 2
<OptionalExtraGroupRule RuleCode="OneOfPerPax" Supplier="JT2">
<ID Direction="outbound">102</ID>
<ID Direction="outbound">101</ID>
<ID Direction="outbound">104</ID>
<ID Direction="outbound">105</ID>
<ID Direction="outbound">106</ID>
<ID Direction="outbound">108</ID>
<ID Direction="outbound">109</ID>
<ID Direction="outbound">119</ID>
<ID Direction="outbound">120</ID>
<ID Direction="outbound">110</ID>
<ID Direction="outbound">111</ID>
<ID Direction="outbound">129</ID>
<ID Direction="outbound">130</ID>
<ID Direction="outbound">131</ID>
<ID Direction="outbound">132</ID>
<ID Direction="outbound">103</ID>
<ID Direction="outbound">107</ID>
<ID Direction="outbound">112</ID>
<ID Direction="outbound">121</ID>
</OptionalExtraGroupRule>
<OptionalExtraGroupRule RuleCode="OneOfPerPax" Supplier="JT2">
<ID Direction="homebound">102</ID>
<ID Direction="homebound">101</ID>
<ID Direction="homebound">104</ID>
<ID Direction="homebound">105</ID>
<ID Direction="homebound">106</ID>
<ID Direction="homebound">108</ID>
<ID Direction="homebound">109</ID>
<ID Direction="homebound">119</ID>
<ID Direction="homebound">120</ID>
<ID Direction="homebound">110</ID>
<ID Direction="homebound">111</ID>
<ID Direction="homebound">129</ID>
<ID Direction="homebound">130</ID>
<ID Direction="homebound">131</ID>
<ID Direction="homebound">132</ID>
<ID Direction="homebound">103</ID>
<ID Direction="homebound">107</ID>
<ID Direction="homebound">112</ID>
<ID Direction="homebound">121</ID>
</OptionalExtraGroupRule>
- These rules informs you that choosing a type of meal is optional for JT2.
- And that you can only choose one type per direction
- And that your choice can differ by passenger