## Retrieve sequence performance

`client.Sequence.GetPerformance(ctx, id) (*SequenceRetrievePerformanceResponse, error)`

**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

- `type SequenceRetrievePerformanceResponse struct{…}`

  - `ByStepType SequenceRetrievePerformanceResponseByStepType`

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

    - `Email SequenceRetrievePerformanceResponseByStepTypeEmail`

      Email steps.

      - `Bounced int64`

        Sent emails that bounced.

      - `BounceRate float64`

        Bounced divided by sent; null if none sent.

      - `CurrentEnrollments int64`

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

      - `Delivered int64`

        Sent minus bounced, never below zero.

      - `Opened int64`

        Sent emails that were opened.

      - `OpenRate float64`

        Opened divided by delivered; null if none delivered.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by delivered; null if none delivered.

      - `Sent int64`

        Messages sent.

    - `LinkedinInvite SequenceRetrievePerformanceResponseByStepTypeLinkedinInvite`

      LinkedIn connection request steps.

      - `AcceptanceRate float64`

        Accepted divided by sent; null if none sent.

      - `Accepted int64`

        Connection requests that were accepted.

      - `CurrentEnrollments int64`

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

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by sent; null if none sent.

      - `Sent int64`

        Messages sent.

    - `LinkedinMessage SequenceRetrievePerformanceResponseByStepTypeLinkedinMessage`

      LinkedIn message steps.

      - `CurrentEnrollments int64`

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

      - `Read int64`

        Sent messages that were read.

      - `ReadRate float64`

        Read divided by sent; null if none sent.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by sent; null if none sent.

      - `Sent int64`

        Messages sent.

    - `Wait SequenceRetrievePerformanceResponseByStepTypeWait`

      Wait steps.

      - `CurrentEnrollments int64`

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

    - `WaitForConnection SequenceRetrievePerformanceResponseByStepTypeWaitForConnection`

      Wait-for-connection steps.

      - `CurrentEnrollments int64`

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

  - `PerStep []SequenceRetrievePerformanceResponsePerStepUnion`

    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.

    - `type SequenceRetrievePerformanceResponsePerStepEmailStep struct{…}`

      - `Bounced int64`

        Sent emails that bounced.

      - `BounceRate float64`

        Bounced divided by sent; null if none sent.

      - `CurrentEnrollments int64`

        Enrollments currently on this step, paused ones included.

      - `Delivered int64`

        Sent minus bounced, never below zero.

      - `Opened int64`

        Sent emails that were opened.

      - `OpenRate float64`

        Opened divided by delivered; null if none delivered.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by delivered; null if none delivered.

      - `Sent int64`

        Messages sent.

      - `SequenceStepID string`

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

      - `SequenceStepType string`

        - `const SequenceRetrievePerformanceResponsePerStepEmailStepSequenceStepTypeEmail SequenceRetrievePerformanceResponsePerStepEmailStepSequenceStepType = "EMAIL"`

    - `type SequenceRetrievePerformanceResponsePerStepLinkedInMessageStep struct{…}`

      - `CurrentEnrollments int64`

        Enrollments currently on this step, paused ones included.

      - `Read int64`

        Sent messages that were read.

      - `ReadRate float64`

        Read divided by sent; null if none sent.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by sent; null if none sent.

      - `Sent int64`

        Messages sent.

      - `SequenceStepID string`

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

      - `SequenceStepType string`

        - `const SequenceRetrievePerformanceResponsePerStepLinkedInMessageStepSequenceStepTypeLinkedinMessage SequenceRetrievePerformanceResponsePerStepLinkedInMessageStepSequenceStepType = "LINKEDIN_MESSAGE"`

    - `type SequenceRetrievePerformanceResponsePerStepLinkedInInviteStep struct{…}`

      - `AcceptanceRate float64`

        Accepted divided by sent; null if none sent.

      - `Accepted int64`

        Connection requests that were accepted.

      - `CurrentEnrollments int64`

        Enrollments currently on this step, paused ones included.

      - `Replied int64`

        Sent messages that received a reply.

      - `ReplyRate float64`

        Replied divided by sent; null if none sent.

      - `Sent int64`

        Messages sent.

      - `SequenceStepID string`

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

      - `SequenceStepType string`

        - `const SequenceRetrievePerformanceResponsePerStepLinkedInInviteStepSequenceStepTypeLinkedinInvite SequenceRetrievePerformanceResponsePerStepLinkedInInviteStepSequenceStepType = "LINKEDIN_INVITE"`

    - `type SequenceRetrievePerformanceResponsePerStepWaitStep struct{…}`

      - `CurrentEnrollments int64`

        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 string`

        - `const SequenceRetrievePerformanceResponsePerStepWaitStepSequenceStepTypeWait SequenceRetrievePerformanceResponsePerStepWaitStepSequenceStepType = "WAIT"`

    - `type SequenceRetrievePerformanceResponsePerStepWaitForConnectionStep struct{…}`

      - `CurrentEnrollments int64`

        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 string`

        - `const SequenceRetrievePerformanceResponsePerStepWaitForConnectionStepSequenceStepTypeWaitForConnection SequenceRetrievePerformanceResponsePerStepWaitForConnectionStepSequenceStepType = "WAIT_FOR_CONNECTION"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sequenceRetrievePerformanceResponse, err := client.Sequence.GetPerformance(context.TODO(), "id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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"
    }
  ]
}
```
