# Debounce functions <VersionBadge version="v3.1.0+" />
Source: https://www.inngest.com/docs/reference/functions/debounce

Debounce delays a function run for the given `period`, and reschedules functions for the given `period` any time new events are received while the debounce is active.  The function run starts after the specified `period` passes and no new events have been received.  Functions use the last event as their input data.

See the [Debounce guide](/docs/guides/debounce) for more information about how this feature works.

```ts
export default inngest.createFunction(
  {
    id: "handle-webhook",
    debounce: {
      key: "event.data.account_id",
      period: "5m",
    },
  },
  { event: "intercom/company.updated" },
  async ({ event, step }) => {
    // This function will only be scheduled 5m after events have stopped being received with the same
    // `event.data.account_id` field.
    //
    // `event` will be the last event in the series received.
  }
);
```

<Properties>
  <Property name="debounce" type="object">
    Options to configure how to debounce function execution

    <Properties nested={true}>
      <Property name="period" type="string" required>
        The time delay to delay execution. The period begins when the first matching event is received.

        Current permitted values are from `1s` to `7d` (`168h`).
      </Property>
      <Property name="key" type="string">
        An optional unique key expression to apply the limit to. The expression is evaluated for each triggering event,
	and allows you to debounce against event data.

        Expressions are defined using the Common Expression Language (CEL) with the original event accessible using dot-notation. Read [our guide to writing expressions](/docs/guides/writing-expressions) for more info. Examples:

        * Rate limit per customer id: `'event.data.customer_id'`
        * Rate limit per account and email address: `'event.data.account_id + "-" + event.user.email'`
      </Property>
      <Property name="timeout" type="string">
        The maximum time that a debounce can be extended before running.
      </Property>
    </Properties>
  </Property>
</Properties>

<Callout>
  Functions will run using the last event received as the input data.
</Callout>

<Callout variant="warning">
  Debounce cannot be combined with [batching](/docs/guides/batching).
</Callout>