---
title: New Relic Service Level actions
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/newrelic/newrelic-service-level
---

This page provides a reference for all New Relic Service Level actions available in the workflow automation actions catalog. These actions let you create, update, delete, and list Service Level Indicators (SLI) and their Service Level Objectives (SLO) directly from a workflow — enabling automated service onboarding, SLO remediation, and compliance workflows.

## Prerequisites

Before using New Relic Service Level actions in workflow automation, make sure you have the following:

A New Relic account with appropriate permissions to manage service levels.

## Create a service level

The action identifier is `newrelic.serviceLevel.create`.

Creates a new Service Level Indicator (SLI) with its Service Level Objective (SLO) for an entity.

### Inputs

The following table describes all available input fields for this action.

| Input                              | Type   | Description                                                                                                                                                             | Example                                                                                  |
| ---------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| **entityGuid**                     | String | **Required.** The entity this SLI is defined against.                                                                                                                   | `"MjXzMzQ2fEFQTXxBUFBMSUNBVElPTnwyMzU5MzAzOTU"`                                          |
| **name**                           | String | **Required.** SLI name.                                                                                                                                                 | `"Checkout API availability"`                                                            |
| **description**                    | String | **Optional.** SLI description.                                                                                                                                          | `"Auto-provisioned on service onboarding"`                                               |
| **accountId**                      | Int    | **Required.** The New Relic account that owns the SLI.                                                                                                                  | `1234567`                                                                                |
| **validEventsFrom**                | String | **Required.** NRDB event type for the valid events pool.                                                                                                                | `"Transaction"`                                                                          |
| **validEventsWhere**               | String | **Optional.** NRQL boolean condition to filter the valid events pool.                                                                                                   | `"appName = 'checkout-api'"`                                                             |
| **validEventsSelectFunction**      | String | **Optional.** Aggregation function for the valid events pool. One of `COUNT`, `SUM`, `GET_FIELD`, `GET_CDF_COUNT`.                                                      | `"COUNT"`                                                                                |
| **validEventsSelectAttribute**     | String | **Optional.** Attribute to aggregate for the valid events pool. Required when `validEventsSelectFunction` is `SUM`, `GET_FIELD`, or `GET_CDF_COUNT`.                    | `"duration"`                                                                             |
| **validEventsSelectThreshold**     | Float  | **Optional.** Threshold value for the valid events pool. Only used when `validEventsSelectFunction` is `GET_CDF_COUNT`.                                                 | `500`                                                                                    |
| **eventCategory**                  | String | **Required.** Classification of the condition events bucket as good or bad events. One of `GOOD`, `BAD`.                                                                | `"GOOD"`                                                                                 |
| **conditionEventsFrom**            | String | **Required.** NRDB event type for the good/bad events bucket.                                                                                                           | `"Transaction"`                                                                          |
| **conditionEventsWhere**           | String | **Optional.** NRQL boolean condition to filter the good/bad events bucket.                                                                                              | `"appName = 'checkout-api' AND error IS FALSE"`                                          |
| **conditionEventsSelectFunction**  | String | **Optional.** Aggregation function for the good/bad events bucket. One of `COUNT`, `SUM`, `GET_FIELD`, `GET_CDF_COUNT`.                                                 | `"COUNT"`                                                                                |
| **conditionEventsSelectAttribute** | String | **Optional.** Attribute to aggregate for the good/bad bucket. Required when `conditionEventsSelectFunction` is `SUM`, `GET_FIELD`, or `GET_CDF_COUNT`.                  | `"duration"`                                                                             |
| **conditionEventsSelectThreshold** | Float  | **Optional.** Threshold value for the good/bad bucket. Only used when `conditionEventsSelectFunction` is `GET_CDF_COUNT`.                                               | `500`                                                                                    |
| **facets**                         | List   | **Optional.** Attributes to group SLI results by.                                                                                                                       | `["appName"]`                                                                            |
| **target**                         | Float  | **Required.** SLO target as a percentage.                                                                                                                               | `99.9`                                                                                   |
| **windowDays**                     | Int    | **Required.** Rolling window in days. Must be `1`, `7`, or `28`.                                                                                                        | `28`                                                                                     |
| **selectors**                      | List   | **Optional.** JQ selectors to extract specific values from the response. Use `.data.serviceLevelCreate.guid` to capture the new SLI's GUID for use in subsequent steps. | ```yaml selectors:   - name: sliGuid     expression: ".data.serviceLevelCreate.guid" ``` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                   |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **success**      | Boolean | `true`/`false`, inherited from the underlying `newrelic.nerdgraph.execute` call — covers both transport failures and NerdGraph business-logic errors.                                                                                         |
| **errorMessage** | String  | Error message on failure, whether transport-level or a NerdGraph business-logic error. `null` on success.                                                                                                                                     |
| **data**         | Map     | NerdGraph response: ```json {   "data": {     "serviceLevelCreate": {       "guid": "MXxFWFR8U0VSVklDRV9MRVZFTHwzMjk5NjE",       "name": "Checkout API availability"     }   } } ``` Use `selectors` to extract `guid` or `name` from `data`. |

### Example

The following example creates an SLI/SLO and captures the new SLI's GUID using `selectors` for use in a subsequent step.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: newrelic_service_level_create_workflow description: Create an SLI/SLO for a service entity steps:   - name: createSlo     type: action     action: newrelic.serviceLevel.create     version: 1     inputs:       entityGuid: ${{ .workflowInputs.entityGuid }}       name: "Checkout API availability"       accountId: ${{ .workflowInputs.accountId }}       validEventsFrom: "Transaction"       eventCategory: "GOOD"       conditionEventsFrom: "Transaction"       conditionEventsWhere: "appName = 'checkout-api' AND error IS FALSE"       target: 99.9       windowDays: 28       selectors:         - name: sliGuid           expression: ".data.serviceLevelCreate.guid"     next: end ``` |

## Update a service level

The action identifier is `newrelic.serviceLevel.update`.

Updates an existing Service Level Indicator's configuration or its Service Level Objective. Uses `newrelic.nerdgraph.execute`.

Fields `name` and `description` are individually optional — omitting either preserves the existing value. Fields `target` and `windowDays` are all-or-nothing: Supply both to change the SLO target, or omit both to keep the existing SLO unchanged.

For the events configuration (`validEvents*`, `conditionEvents*`, `eventCategory`, `facets`), omitting any field removes it rather than preserving it. To change one field in the events section, resupply the full current events definition alongside the change.

### Inputs

The following table describes all available input fields for this action.

| Input                              | Type   | Description                                                                                                                                                                              | Example                                                                                  |
| ---------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| **sliGuid**                        | String | **Required.** The SLI's GUID. Use the `sliGuid` selector output from `newrelic.serviceLevel.create`.                                                                                     | `"MXxFWFR8U0VSVklDRV9MRVZFTHwzMjk5NjE"`                                                  |
| **name**                           | String | **Optional.** New SLI name. Omitting preserves the existing name.                                                                                                                        | `"Checkout API availability (v2)"`                                                       |
| **description**                    | String | **Optional.** New SLI description. Omitting preserves the existing description.                                                                                                          | `"Tightened after Q3 reliability review"`                                                |
| **validEventsFrom**                | String | **Optional.** NRDB event type for the valid events pool. Required if any other `validEvents*`, `conditionEvents*`, or `eventCategory` field is set.                                      | `"Transaction"`                                                                          |
| **validEventsWhere**               | String | **Optional.** NRQL boolean condition to filter the valid events pool.                                                                                                                    | `"appName = 'checkout-api'"`                                                             |
| **validEventsSelectFunction**      | String | **Optional.** Aggregation function for the valid events pool. One of `COUNT`, `SUM`, `GET_FIELD`, `GET_CDF_COUNT`.                                                                       | `"COUNT"`                                                                                |
| **validEventsSelectAttribute**     | String | **Optional.** Attribute to aggregate for the valid events pool. Required when `validEventsSelectFunction` is `SUM`, `GET_FIELD`, or `GET_CDF_COUNT`.                                     | `"duration"`                                                                             |
| **validEventsSelectThreshold**     | Float  | **Optional.** Threshold value for the valid events pool. Only used when `validEventsSelectFunction` is `GET_CDF_COUNT`.                                                                  | `500`                                                                                    |
| **eventCategory**                  | String | **Optional.** Classification of the condition events bucket as good or bad events. One of `GOOD`, `BAD`. Required together with `conditionEventsFrom` when setting events configuration. | `"GOOD"`                                                                                 |
| **conditionEventsFrom**            | String | **Optional.** NRDB event type for the good/bad events bucket.                                                                                                                            | `"Transaction"`                                                                          |
| **conditionEventsWhere**           | String | **Optional.** NRQL boolean condition to filter the good/bad events bucket.                                                                                                               | `"appName = 'checkout-api' AND error IS FALSE"`                                          |
| **conditionEventsSelectFunction**  | String | **Optional.** Aggregation function for the good/bad events bucket. One of `COUNT`, `SUM`, `GET_FIELD`, `GET_CDF_COUNT`.                                                                  | `"COUNT"`                                                                                |
| **conditionEventsSelectAttribute** | String | **Optional.** Attribute to aggregate for the good/bad bucket. Required when `conditionEventsSelectFunction` is `SUM`, `GET_FIELD`, or `GET_CDF_COUNT`.                                   | `"duration"`                                                                             |
| **conditionEventsSelectThreshold** | Float  | **Optional.** Threshold value for the good/bad bucket. Only used when `conditionEventsSelectFunction` is `GET_CDF_COUNT`.                                                                | `500`                                                                                    |
| **facets**                         | List   | **Optional.** Attributes to group SLI results by.                                                                                                                                        | `["appName"]`                                                                            |
| **target**                         | Float  | **Optional.** New SLO target as a percentage. All-or-nothing with `windowDays`: supply both together or omit both.                                                                       | `99.95`                                                                                  |
| **windowDays**                     | Int    | **Optional.** Rolling window in days. Must be `1`, `7`, or `28` when set. All-or-nothing with `target`: supply both together or omit both.                                               | `28`                                                                                     |
| **selectors**                      | List   | **Optional.** JQ selectors to extract specific values from the response.                                                                                                                 | ```yaml selectors:   - name: sliGuid     expression: ".data.serviceLevelUpdate.guid" ``` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                        |
| ---------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **success**      | Boolean | `true`/`false`, inherited from the underlying `newrelic.nerdgraph.execute` call — covers both transport failures and NerdGraph business-logic errors.                                                                                              |
| **errorMessage** | String  | Error message on failure, whether transport-level or a NerdGraph business-logic error. `null` on success.                                                                                                                                          |
| **data**         | Map     | NerdGraph response: ```json {   "data": {     "serviceLevelUpdate": {       "guid": "MXxFWFR8U0VSVklDRV9MRVZFTHwzMjk5NjE",       "name": "Checkout API availability (v2)"     }   } } ``` Use `selectors` to extract `guid` or `name` from `data`. |

### Example

The following example tightens the SLO target on an existing SLI using the GUID captured from a prior `newrelic.serviceLevel.create` step.

| Workflow example                                                                                                                                                                                                                                                                                                                               |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: newrelic_service_level_update_workflow description: Tighten the SLO target on an existing SLI steps:   - name: tightenSlo     type: action     action: newrelic.serviceLevel.update     version: 1     inputs:       sliGuid: ${{ .steps.createSlo.outputs.sliGuid }}       target: 99.95       windowDays: 28     next: end ``` |

## Delete a service level

The action identifier is `newrelic.serviceLevel.delete`.

Removes an existing Service Level Indicator (SLI) and its Service Level Objective (SLO). Uses `newrelic.nerdgraph.execute`.

### Inputs

The following table describes all available input fields for this action.

| Input         | Type   | Description                                                                                          | Example                                                                                      |
| ------------- | ------ | ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| **sliGuid**   | String | **Required.** The SLI's GUID. Use the `sliGuid` selector output from `newrelic.serviceLevel.create`. | `"MXxFWFR8U0VSVklDRV9MRVZFTHwzMjk5NjE"`                                                      |
| **selectors** | List   | **Optional.** JQ selectors to extract specific values from the response.                             | ```yaml selectors:   - name: deletedGuid     expression: ".data.serviceLevelDelete.guid" ``` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                   |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **success**      | Boolean | `true`/`false`, inherited from the underlying `newrelic.nerdgraph.execute` call — covers both transport failures (non-200, network error) and NerdGraph business-logic errors (`errors` array on an otherwise-200 response).                  |
| **errorMessage** | String  | Error message on failure, whether transport-level or a NerdGraph business-logic error. `null` on success.                                                                                                                                     |
| **data**         | Map     | NerdGraph response: ```json {   "data": {     "serviceLevelDelete": {       "guid": "MXxFWFR8U0VSVklDRV9MRVZFTHwzMjk5NjE",       "name": "Checkout API availability"     }   } } ``` Use `selectors` to extract `guid` or `name` from `data`. |

### Example

The following example deletes an SLI using a GUID passed in as a workflow input.

| Workflow example                                                                                                                                                                                                                                                             |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: newrelic_service_level_delete_workflow description: Delete an existing SLI/SLO steps:   - name: retireSlo     type: action     action: newrelic.serviceLevel.delete     version: 1     inputs:       sliGuid: ${{ .workflowInputs.sliGuid }}     next: end ``` |

## List service levels

The action identifier is `newrelic.serviceLevel.list`.

Lists Service Level Indicator entities, optionally scoped to an account or compliance status. Uses `newrelic.nerdgraph.execute`.

### Inputs

The following table describes all available input fields for this action.

| Input                | Type    | Description                                                                                                                                                                                                                                                                                              | Example                                                                                                                                                                                  |
| -------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **accountId**        | Int     | **Optional.** Scope results to one New Relic account. Omitting returns SLIs across all accounts accessible to the requester.                                                                                                                                                                             | `11933347`                                                                                                                                                                               |
| **onlyNonCompliant** | Boolean | **Optional.** Compliance status filter. When `true`, restricts results to SLIs tagged `Non-compliant` or `At risk` — equivalent to the Service Level Management UI's "Show only at risk and non-compliant" toggle. `false` and omitting this field both return all SLIs regardless of compliance status. | `true`                                                                                                                                                                                   |
| **filter**           | String  | **Optional.** Additional raw `entitySearch` filter clause appended to the query.                                                                                                                                                                                                                         | `"name LIKE '%checkout%'"`                                                                                                                                                               |
| **limit**            | Int     | **Optional.** Page size for the results.                                                                                                                                                                                                                                                                 | `50`                                                                                                                                                                                     |
| **cursor**           | String  | **Optional.** Pagination token from a prior call's `nextCursor` output. Leave blank on the first call.                                                                                                                                                                                                   | `"oWUNlXQ65ke3hEVGplVS1UOWJFRstmVTZFMVhj..."`                                                                                                                                            |
| **selectors**        | List    | **Optional.** JQ selectors to extract specific values from the response. Use `.data.actor.entitySearch.results.entities` to get the SLI list and `.data.actor.entitySearch.results.nextCursor` for the pagination token.                                                                                 | ```yaml selectors:   - name: entities     expression: ".data.actor.entitySearch.results.entities"   - name: nextCursor     expression: ".data.actor.entitySearch.results.nextCursor" ``` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **success**      | Boolean | `true`/`false`, inherited from the underlying `newrelic.nerdgraph.execute` call — covers both transport failures and NerdGraph business-logic errors.                                                                                                                                                                                                                                                                                                                                                             |
| **errorMessage** | String  | Error message on failure, whether transport-level or a NerdGraph business-logic error. `null` on success.                                                                                                                                                                                                                                                                                                                                                                                                         |
| **data**         | Map     | Raw NerdGraph response. Use `selectors` to extract `entities`, `count`, or `nextCursor` from `data`. `nextCursor` is `null` when there are no further pages. ```json {   "data": {     "actor": {       "entitySearch": {         "count": 2,         "results": {           "entities": [             {               "guid": "MXxFWFR8U0VSVklDRV9MRVZFTHwzMjk5NjE",               "name": "Checkout API availability"             }           ],           "nextCursor": null         }       }     }   } } ``` |

### Example

The following example lists all non-compliant SLIs for an account and extracts the entity list using `selectors`.

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ```yaml name: newrelic_service_level_list_workflow description: List non-compliant SLIs for an account steps:   - name: findNonCompliantSlis     type: action     action: newrelic.serviceLevel.list     version: 1     inputs:       accountId: ${{ .workflowInputs.accountId }}       onlyNonCompliant: true       limit: 50       selectors:         - name: entities           expression: ".data.actor.entitySearch.results.entities"     next: end ``` |
