Is it possible to have different calculations for different customers?

If you have customers in the UK and in the US, you might need different calculations for each region, for example due to tax. You can do this using securityContext. E.g.:

  - name: price_incl_tax
    type: sum
    sql: price * {COMPILE_CONTEXT.securityContext.tax_rate}

Where you would use ‘1’ for countries with tax included, or 1.2 for the others.