## Retrieve sequence performance

`client.sequence.retrievePerformance(stringid, RequestOptionsoptions?): SequenceRetrievePerformanceResponse`

**get** `/v1/sequences/{id}/performance`

Retrieves a sequence’s lifetime engagement, totalled by step type and broken down per step, with the live enrollments currently on each step. Test runs are not counted. A sequence that has never been published reports zero counts and no steps.

**[Required scope](/using-the-api/scopes/):** `sequences:read`

**[Rate limit category](/using-the-api/rate-limits/):** Read

### Parameters

- `id: string`

  Unique identifier of the sequence.

### Returns

- `SequenceRetrievePerformanceResponse`

  - `byStepType: ByStepType`

    Lifetime totals for each step type, across all of its steps.

    - `EMAIL: Email`

      Email steps.

      - `bounced: number`

        Sent emails that bounced.

      - `bounceRate: number | null`

        Bounced divided by sent; null if none sent.

      - `currentEnrollments: number`

        Enrollments currently on steps of this type, paused ones included.

      - `delivered: number`

        Sent minus bounced, never below zero.

      - `opened: number`

        Sent emails that were opened.

      - `openRate: number | null`

        Opened divided by delivered; null if none delivered.

      - `replied: number`

        Sent messages that received a reply.

      - `replyRate: number | null`

        Replied divided by delivered; null if none delivered.

      - `sent: number`

        Messages sent.

    - `LINKEDIN_INVITE: LinkedinInvite`

      LinkedIn connection request steps.

      - `acceptanceRate: number | null`

        Accepted divided by sent; null if none sent.

      - `accepted: number`

        Connection requests that were accepted.

      - `currentEnrollments: number`

        Enrollments currently on steps of this type, paused ones included.

      - `replied: number`

        Sent messages that received a reply.

      - `replyRate: number | null`

        Replied divided by sent; null if none sent.

      - `sent: number`

        Messages sent.

    - `LINKEDIN_MESSAGE: LinkedinMessage`

      LinkedIn message steps.

      - `currentEnrollments: number`

        Enrollments currently on steps of this type, paused ones included.

      - `read: number`

        Sent messages that were read.

      - `readRate: number | null`

        Read divided by sent; null if none sent.

      - `replied: number`

        Sent messages that received a reply.

      - `replyRate: number | null`

        Replied divided by sent; null if none sent.

      - `sent: number`

        Messages sent.

    - `WAIT: Wait`

      Wait steps.

      - `currentEnrollments: number`

        Enrollments currently on steps of this type, paused ones included.

    - `WAIT_FOR_CONNECTION: WaitForConnection`

      Wait-for-connection steps.

      - `currentEnrollments: number`

        Enrollments currently on steps of this type, paused ones included.

  - `perStep: Array<EmailStep | LinkedInMessageStep | LinkedInInviteStep | 2 more>`

    Per-step statistics in published sequence order, including steps with no activity. Steps no longer in the published definition are included if they have sent messages.

    - `EmailStep`

      - `bounced: number`

        Sent emails that bounced.

      - `bounceRate: number | null`

        Bounced divided by sent; null if none sent.

      - `currentEnrollments: number`

        Enrollments currently on this step, paused ones included.

      - `delivered: number`

        Sent minus bounced, never below zero.

      - `opened: number`

        Sent emails that were opened.

      - `openRate: number | null`

        Opened divided by delivered; null if none delivered.

      - `replied: number`

        Sent messages that received a reply.

      - `replyRate: number | null`

        Replied divided by delivered; null if none delivered.

      - `sent: number`

        Messages sent.

      - `sequenceStepId: string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `sequenceStepType: "EMAIL"`

        - `"EMAIL"`

    - `LinkedInMessageStep`

      - `currentEnrollments: number`

        Enrollments currently on this step, paused ones included.

      - `read: number`

        Sent messages that were read.

      - `readRate: number | null`

        Read divided by sent; null if none sent.

      - `replied: number`

        Sent messages that received a reply.

      - `replyRate: number | null`

        Replied divided by sent; null if none sent.

      - `sent: number`

        Messages sent.

      - `sequenceStepId: string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `sequenceStepType: "LINKEDIN_MESSAGE"`

        - `"LINKEDIN_MESSAGE"`

    - `LinkedInInviteStep`

      - `acceptanceRate: number | null`

        Accepted divided by sent; null if none sent.

      - `accepted: number`

        Connection requests that were accepted.

      - `currentEnrollments: number`

        Enrollments currently on this step, paused ones included.

      - `replied: number`

        Sent messages that received a reply.

      - `replyRate: number | null`

        Replied divided by sent; null if none sent.

      - `sent: number`

        Messages sent.

      - `sequenceStepId: string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `sequenceStepType: "LINKEDIN_INVITE"`

        - `"LINKEDIN_INVITE"`

    - `WaitStep`

      - `currentEnrollments: number`

        Enrollments currently on this step, paused ones included.

      - `sequenceStepId: string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `sequenceStepType: "WAIT"`

        - `"WAIT"`

    - `WaitForConnectionStep`

      - `currentEnrollments: number`

        Enrollments currently on this step, paused ones included.

      - `sequenceStepId: string`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `sequenceStepType: "WAIT_FOR_CONNECTION"`

        - `"WAIT_FOR_CONNECTION"`

### Example

```typescript
import Lightfield from 'lightfield';

const client = new Lightfield({
  apiKey: 'My API Key',
});

const sequenceRetrievePerformanceResponse = await client.sequence.retrievePerformance('id');

console.log(sequenceRetrievePerformanceResponse.byStepType);
```

#### Response

```json
{
  "byStepType": {
    "EMAIL": {
      "bounced": -9007199254740991,
      "bounceRate": 0,
      "currentEnrollments": -9007199254740991,
      "delivered": -9007199254740991,
      "opened": -9007199254740991,
      "openRate": 0,
      "replied": -9007199254740991,
      "replyRate": 0,
      "sent": -9007199254740991
    },
    "LINKEDIN_INVITE": {
      "acceptanceRate": 0,
      "accepted": -9007199254740991,
      "currentEnrollments": -9007199254740991,
      "replied": -9007199254740991,
      "replyRate": 0,
      "sent": -9007199254740991
    },
    "LINKEDIN_MESSAGE": {
      "currentEnrollments": -9007199254740991,
      "read": -9007199254740991,
      "readRate": 0,
      "replied": -9007199254740991,
      "replyRate": 0,
      "sent": -9007199254740991
    },
    "WAIT": {
      "currentEnrollments": -9007199254740991
    },
    "WAIT_FOR_CONNECTION": {
      "currentEnrollments": -9007199254740991
    }
  },
  "perStep": [
    {
      "bounced": -9007199254740991,
      "bounceRate": 0,
      "currentEnrollments": -9007199254740991,
      "delivered": -9007199254740991,
      "opened": -9007199254740991,
      "openRate": 0,
      "replied": -9007199254740991,
      "replyRate": 0,
      "sent": -9007199254740991,
      "sequenceStepId": "sequenceStepId",
      "sequenceStepType": "EMAIL"
    }
  ]
}
```
