Add a field for alert level | TICKScript

Hi,

I write alert data back to influxdb but I want to add a field for level as integer 0, 1, 2, 3.
How can I do that?

....
   |alert
        .crit(lambda: "crit_duration" >= 5)
        .critReset(lambda: "reset_duration" >= 2)
...
        .levelTag('alertLevel')
        .idTag('alertID')
    |influxDBOut()
        .create()
        .database(outputDB)
        .retentionPolicy(outputRP)
        .measurement(outputMeasurement)
        .tag('alertCategory', category)