{
    "rest": true,
    "allowMapping": true,
    "type": "serviceitem",
    "id": "serviceitem",
    "criteria": "item",
    "select": "LISTAGG(pricing.pricelevel, ', ') WITHIN GROUP (ORDER BY pricing.pricelevel) AS price_levels, LISTAGG(pricing.unitprice, ', ') WITHIN GROUP (ORDER BY pricing.pricelevel) AS unit_prices",
    "where": "WHERE item.itemType = 'Service'",
    "inner": "LEFT JOIN pricing ON pricing.item = item.id",
    "group": "GROUP BY item.id, item.itemid, item.billingSchedule, item.billQtyVarianceAcct, item.class, item.costEstimate, item.costEstimateType, item.deferredRevenueAccount, item.department, item.description, item.displayName, item.dontShowPrice, item.includeChildren, item.incomeAccount, item.isfulfillable, item.isInactive, item.itemType, item.location, item.maximumquantity, item.minimumquantity, item.noPriceMessage, item.outOfStockBehavior, item.outOfStockMessage, item.parent, item.pricingGroup, item.projectExpenseType, item.storeDescription, item.subsidiary, item.subtype, item.unitsType",
    "keep": ["unit_prices", "price_levels"],
    "mapping": {
        "billingschedule": "billingSchedule",
        "billqtyvarianceacct": "billQtyVarianceAcct",
        "class": "class",
        "costestimate": "costEstimate",
        "costestimatetype": "costEstimateType",
        "deferredrevenueaccount": "deferredRevenueAccount",
        "department": "department",
        "description": "description",
        "displayname": "displayName",
        "dontshowprice": "dontShowPrice",
        "includechildren": "includeChildren",
        "incomeaccount": "incomeAccount",
        "isfulfillable": "isfulfillable",
        "isinactive": "isInactive",
        "itemtype": "itemType",
        "location": "location",
        "maximumquantity": "maximumquantity",
        "minimumquantity": "minimumquantity",
        "nopricemessage": "noPriceMessage",
        "outofstockbehavior": "outOfStockBehavior",
        "outofstockmessage": "outOfStockMessage",
        "parent": "parent",
        "pricinggroup": "pricingGroup",
        "projectexpensetype": "projectExpenseType",
        "storedescription": "storeDescription",
        "subsidiary": "subsidiary",
        "subtype": "subtype",
        "title": "itemId",
        "unitstype": "unitsType"
    }
}
