Optional Extras

Many FAB flight suppliers support optional extras (aka services/ancillaries).

This page provides examples and advice on how to use optional extras.

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 component
  • Description - a text description of the extra, generally in English
  • Code - used for selection
  • Supplier - which supplier the extra applies to
  • FPC - helps identify the type of extra
  • Type - helps identify the type of extra
  • QuantityAvailable - how many of the extra can be selected in total
  • UnitCost - cost per unit of the extra
  • CurrencyCode - currency of the UnitCost
  • ApplyTo - indicates how the extra applies. E.g does it apply per passenger (SelectedPax) or to the whole party (AllPax)?
    • AllPax is 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 response OptionalExtra
  • Code - must be set. Based on the respective response OptionalExtra
  • Supplier - must be set. Based on the respective response OptionalExtra
  • Quantity - must be set. Set to how many OptionalExtra units you want.
    • Set to 0 to deselect
  • ComponentId - must be set only if it was set on the respective response OptionalExtra

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:

  • This type of selection only works where PassengerDetails is 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@ApplyTo equals AllPax in FAB_BasketRS then 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@ApplyTo equals SelectedPax in FAB_BasketRS then that extra will be applied to specific passengers in the background based on Quantity but 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”

Viewing selected extras

To view selected extras check the following FAB_BasketRS elements:

  1. Itinerary/OptionalExtras - for extras assigned to the itinerary
  2. PassengerDetails/LeadCustomer/OptionalExtras - for extras assigned to the lead customer/passenger
  3. PassengerDetails/Customer[*]/OptionalExtras - for extras assigned to a specific (non-lead) customer/passenger

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 Description unsuitable you should use your own description and map it to Supplier + Code
    • We highly recommend that this mapping is configurable so that you can quickly support any new extras or suppliers
  • Similarly Type can be useful for categorising extras though if your find it too high level you can map to Supplier + 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 QuantityAvailable then dynamically subtract the quantity that have been selected on your frontend
  • You’ll likely need to surface the information from Direction and ApplyTo to 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 ApplyTo for these extras was set as AllPax (not shown in this example snippet)

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

Last modified November 30, 2022