> ## Documentation Index
> Fetch the complete documentation index at: https://developers.loyaltylion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# program_events/customer.approaching_tier_upgrade

export const LoyaltyTierObject = ({defaultOpen = false}) => <Expandable title="properties" defaultOpen={defaultOpen}>
    <ResponseField name="id" type="number" required={true}>
      Unique LoyaltyLion ID of the tier
    </ResponseField>

    <ResponseField name="name" type="string" required={true}>
      The name of the tier
    </ResponseField>

    <ResponseField name="number" type="number" required={true}>
      The sequential, ordered number of the tier. The default (first) tier will be <code>1</code>
    </ResponseField>

    <ResponseField name="default" type="boolean" required={true}>
      Indicates if this is the default (first) tier in the program
    </ResponseField>

    <ResponseField name="hidden" type="boolean" required={true}>
      Indicates if this is a hidden tier
    </ResponseField>

    <ResponseField name="lower_bound" type="string" required={true}>
      <p>The lower bound of the tier. For spend-based tiers, this will be a decimal
      value, e.g. a lower bound of $100 will be <code>100.00</code></p>

      <p>For point-based tiers, this value will be divided by 100. To
      get the correct value for the bound, multiply it by 100. For example, if
      the lower bound of the tier is 5000, the value returned will be <code>50.00</code></p>
    </ResponseField>

    <ResponseField name="upper_bound" type="string | null" required={true}>
      <p>The upper bound of the tier. For spend-based tiers, this will be a decimal
      value, e.g. a lower bound of $100 will be <code>100.00</code></p>

      <p>For point-based tiers, this value will be divided by 100. To
      get the correct value for the bound, multiply it by 100. For example, if
      the lower bound of the tier is 5000, the value returned will be <code>50.00</code></p>

      <p>This will be <code>null</code> if there is no upper bound for the tier.</p>
    </ResponseField>

  </Expandable>;

This webhook is fired when a customer is close to moving up a tier. The
constraint (i.e. how close a customer should be to the next tier before this
webhook is sent) can be configured in your LoyaltyLion admin.

To subscribe to this webhook, your access token needs to contain the
`read_customers` scope.

<Note>This webhook has a 7 day cool-down period per individual customer</Note>

## Payload

<ResponseField name="customer" type="object" required>
  Customer object with the same shape as the [Customers
  API](/api-reference/v2/resources/customers/list-customers#response-customers)
  response
</ResponseField>

<ResponseField name="current_tier" type="object" required>
  The loyalty tier the customer is currently in

  <LoyaltyTierObject defaultOpen={false} />
</ResponseField>

<ResponseField name="next_tier" type="object" required>
  The next tier the customer is approaching

  <LoyaltyTierObject defaultOpen={false} />
</ResponseField>

<ResponseField name="points_required" type="number | null" required>
  If tiers are points-based, the number of points required to reach the next
  tier
</ResponseField>

<ResponseField name="spend_required" type="number | null" required>
  If tiers are spend-based, the spend required to reach the next tier
</ResponseField>

## Example

```json Example theme={null}
{
  "id": "bff1bddb-6cd8-4c2c-9619-18744657053c",
  "topic": "program_events/customer.approaching_tier_upgrade",
  "created_at": "2018-01-01T03:00:05.000Z",
  "payload": {
    "properties": {
      "customer": {
        "id": 6932,
        "merchant_id": "2134606599",
        "email": "jessica@example.com",
        "points_approved": 200,
        "points_pending": 300,
        "points_spent": 500,
        "rewards_claimed": 5,
        "rewards_used": 0,
        "properties": {
          "name": "Jessica White"
        },
        "metadata": {},
        "birthday": "1990-01-29",
        "blocked": false,
        "guest": false,
        "enrolled": true,
        "enrolled_at": "2015-12-10T03:00:00.000Z",
        "referral_id": "a4e",
        "referred_by": {
          "id": 3958,
          "merchant_id": "192838592"
        },
        "loyalty_tier_membership": {
          "started_at": "2017-03-03 00:00:00Z",
          "expires_at": null,
          "manual": false,
          "loyalty_tier": {
            "id": 15,
            "name": "Bronze",
            "position": 1,
            "default": true,
            "hidden": false,
            "lower_bound": "0.00",
            "upper_bound": "200.00"
          }
        },
        "tier_eligibility": {
          "kind": "points",
          "valid_until": null,
          "tier_points": {
            "now": 180,
            "at_expiration": null
          },
          "points_needed_for_renewal": null,
          "points_needed_for_upgrade": 20,
          "upgrade_tier": {
            "id": 16,
            "name": "Silver",
            "threshold": 200
          },
          "forecasted_tier": null
        },
        "insights_segment": "Loyal",
        "referral_url": "https://prz.io/KzByQ2Fa",
        "created_at": "2016-12-10T03:00:00.000Z",
        "updated_at": "2018-01-01T03:00:00.000Z"
      },
      "next_tier": {
        "id": 16,
        "name": "Silver",
        "number": 2,
        "default": false,
        "hidden": false,
        "lower_bound": "200.01",
        "upper_bound": "400.00"
      },
      "current_tier": {
        "id": 15,
        "name": "Bronze",
        "number": 1,
        "default": true,
        "hidden": false,
        "lower_bound": "0.00",
        "upper_bound": "200.00"
      }
    }
  }
}
```
