Aggregation

Aggregation plugins extends HotelX allowing aggregation Supplier options and responses using different business rules.

Aggregation Key

Aggregate Supplier options based on field keys applying a selector function over field values.

It’s based on SQL Aggregate Functions.

  • Field Keys as a combination of:
    • binding
    • board
    • cancelPolicy
    • currency
    • hotel
    • market
    • payment
    • promotion
    • rateRules 
    • refundable
    • room
    • supplement
    • supplier
    • surcharges

Parameters

key value type condition description
primaryKey string mandatory It is the criteria used to aggregate, the value is a set of criteria separated by commas, the possible values are:
example: “hotel,supplier,room”

Processor

It’s implemented as a Processor plugin

Execution example

{
    "plugins": {
        "step": "RESPONSE_OPTION/RESPONSE",
        "pluginsType": [
            {
                "type": "AGGREGATION",
                "name": "cheapest_price",
                "parameters": [
                    {
                        {"key": "primaryKey","value": "hotel,supplier,room"}
                    }
                ]
            }
        ]
    }
}

Comments