# Progression

**URL:** https://heroiclabs.com/docs/hiro/server-framework/progression/
**Keywords:** progression, hiro
**Categories:** hiro, progression, server-framework

---


# Progression

Read more about the Progression system in Hiro [here](../../concepts/progression/).

## Functions

### Get

Get all, or an optionally-filtered set of progressions for the given user.

```go
userId := "userId"
lastKnownProgressions := map[string]*hiro.Progression{}

progressions, deltas, err := systems.GetProgressionSystem().Get(ctx, logger, nk, userId, lastKnownProgressions)
if err != nil {
  return err
}
```

### Purchase

Permanently unlock a specified progression, if that progression supports this operation.

```go
userId := "userId"
progressionId := "progressionId"

progressions, err := systems.GetProgressionSystem().Purchase(ctx, logger, nk, userId, progressionId)
if err != nil {
  return err
}
```

### Update

Update a specified progression, if that progression supports this operation.

```go
userId := "userId"
progressionId := "progressionId"
counts := map[string]int64{"rank": 2, "xp": 5}

progressions, err := systems.GetProgressionSystem().Update(ctx, logger, nk, userId, progressionId, counts)
if err != nil {
  return err
}
```

### Reset

Reset one or more progressions to clear their progress. Only applies to progression counts and unlock costs.

```go
userId := "userId"
progressionIds := []string{"progressionId_001", "progressionId_002"}

progressions, err := systems.GetProgressionSystem().Reset(ctx, logger, nk, userId, progressionIds)
if err != nil {
  return err
}
```