--- title: pagerduty.actionFromSeverity() function description: > `pagerduty.actionFromSeverity()` converts a severity to a PagerDuty action. menu: flux_0_x_ref: name: pagerduty.actionFromSeverity parent: pagerduty identifier: pagerduty/actionFromSeverity weight: 101 --- `pagerduty.actionFromSeverity()` converts a severity to a PagerDuty action. - `ok` converts to `resolve`. - All other severities convert to `trigger`. ##### Function type signature ```js (severity: string) => string ``` {{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} ## Parameters ### severity ({{< req >}}) Severity to convert to a PagerDuty action. ## Examples ### Convert a severity to a PagerDuty action ```js import "pagerduty" pagerduty.actionFromSeverity(severity: "crit")// Returns trigger ```