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

# Deputy Webhook Setup Guide

> Configure Deputy to deliver events to StackOne.

## Prerequisites

Before continuing, you should have already completed the following for this connector:

<Steps>
  <Step title="Configure the Connector">
    Enable the connector and set up its connector profile in your project. See <a href="/guides/explore-connectors">Managing Connectors</a>.

    <Columns cols={2}>
      <Card title="Connector Profile" href="/connectors/deputy/guides/connector-profile/oauth-2-0" icon="https://stackone-logos.com/api/deputy/filled/png" horizontal>
        Deputy - OAuth 2.0
      </Card>
    </Columns>
  </Step>

  <Step title="Link an Account">
    Connect an account using <a href="/guides/embedding-stackone-hub">StackOne Hub</a> or <a href="/guides/auth-link">Auth Link</a>.

    <Columns cols={2}>
      <Card title="Link Account" href="/connectors/deputy/guides/link-account/oauth-2-0" icon="https://stackone-logos.com/api/deputy/filled/png" horizontal>
        Deputy - OAuth 2.0
      </Card>
    </Columns>
  </Step>
</Steps>

<section data-guide-section data-guide-scopes="">
  <h2>How Deputy webhooks are set up</h2>

  <p>Deputy webhooks are provisioned automatically when you connect your account — there is nothing to configure in Deputy and no URL to paste. StackOne registers one webhook per event you enable, each pointing at StackOne's receiver.</p>

  <ul>
    <li>No callback URL to copy, and no verification step to complete.</li>
    <li>Webhooks are registered against the Deputy installation you connect (e.g. `yourcompany.au.deputy.com`).</li>
    <li>Only the events you enable in StackOne are registered in Deputy and delivered.</li>
    <li>You can review the registered webhooks in Deputy under the Webhooks list.</li>
  </ul>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Before you connect</h2>

  <p>Make sure the Deputy account you authorize can manage webhooks and read the resources you want events for.</p>

  <ul>
    <li>Connect with a Deputy user that has administrator access to the installation.</li>
    <li>Webhooks and the data they deliver respect that user's permissions.</li>
  </ul>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Available webhook events</h2>

  <p>The following Deputy events can be enabled. Only events selected in StackOne are registered in Deputy and delivered — Deputy will not send events you have not subscribed to.</p>

  <Steps>
    <Step title="Employee events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events related to employee records.</p>

        <ul>
          <li><strong>Employee Created</strong> (`Employee.Insert`) — Fired when a new employee is added</li>
          <li><strong>Employee Updated</strong> (`Employee.Update`) — Fired when an employee record changes</li>
          <li><strong>Employee Deleted</strong> (`Employee.Delete`) — Fired when an employee is removed</li>
        </ul>
      </div>
    </Step>

    <Step title="Employee availability events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events for the days and hours employees set as available or unavailable to work.</p>

        <ul>
          <li><strong>Availability Created</strong> (`EmployeeAvailability.Insert`) — Fired when an employee adds an availability entry</li>
          <li><strong>Availability Updated</strong> (`EmployeeAvailability.Update`) — Fired when an availability entry changes</li>
          <li><strong>Availability Deleted</strong> (`EmployeeAvailability.Delete`) — Fired when an availability entry is removed</li>
        </ul>
      </div>
    </Step>

    <Step title="Location events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events on company/location (business) records.</p>

        <ul>
          <li><strong>Location Created</strong> (`Company.Insert`) — Fired when a new location is added</li>
          <li><strong>Location Updated</strong> (`Company.Update`) — Fired when a location's details change</li>
          <li><strong>Location Deleted</strong> (`Company.Delete`) — Fired when a location is deleted</li>
        </ul>
      </div>
    </Step>

    <Step title="Area events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events on Areas (called Operational Units in the API) — the jobs or places within a location, such as Chef or Front of House.</p>

        <ul>
          <li><strong>Area Created</strong> (`OperationalUnit.Insert`) — Fired when a new area is created</li>
          <li><strong>Area Updated</strong> (`OperationalUnit.Update`) — Fired when an area's details change</li>
          <li><strong>Area Deleted</strong> (`OperationalUnit.Delete`) — Fired when an area is deleted</li>
        </ul>
      </div>
    </Step>

    <Step title="Schedule events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events on Schedules (called Rosters in the API) — shifts assigned to employees.</p>

        <ul>
          <li><strong>Shift Created</strong> (`Roster.Insert`) — Fired when a shift is added to a schedule</li>
          <li><strong>Shift Updated</strong> (`Roster.Update`) — Fired when a shift's details change</li>
          <li><strong>Shift Deleted</strong> (`Roster.Delete`) — Fired when a shift is removed</li>
          <li><strong>Schedule Published</strong> (`Roster.Publish`) — Fired when a schedule is published to staff</li>
        </ul>
      </div>
    </Step>

    <Step title="Open shift events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events on shifts that are open (not yet assigned to an employee).</p>

        <ul>
          <li><strong>Open Shift Created</strong> (`RosterOpen.Insert`) — Fired when an unassigned open shift is created</li>
          <li><strong>Open Shift Updated</strong> (`RosterOpen.Update`) — Fired when an open shift changes</li>
          <li><strong>Open Shift Deleted</strong> (`RosterOpen.Delete`) — Fired when an open shift is removed</li>
        </ul>
      </div>
    </Step>

    <Step title="Shift swap events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events on shifts offered for swap between employees.</p>

        <ul>
          <li><strong>Swap Created</strong> (`RosterSwap.Insert`) — Fired when a shift is offered for swap</li>
          <li><strong>Swap Updated</strong> (`RosterSwap.Update`) — Fired when a shift swap changes</li>
          <li><strong>Swap Deleted</strong> (`RosterSwap.Delete`) — Fired when a shift swap is withdrawn</li>
        </ul>
      </div>
    </Step>

    <Step title="Timesheet events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events on timesheets, created as employees clock in and out.</p>

        <ul>
          <li><strong>Timesheet Created</strong> (`Timesheet.Insert`) — Fired when a timesheet is created (for example, an employee clocks in)</li>
          <li><strong>Timesheet Updated</strong> (`Timesheet.Update`) — Fired when a timesheet changes (for example, clock-out or an edit)</li>
          <li><strong>Timesheet Deleted</strong> (`Timesheet.Delete`) — Fired when a timesheet is deleted</li>
        </ul>
      </div>
    </Step>

    <Step title="Timesheet pay-approval events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events on the pay-approval status of a timesheet.</p>

        <ul>
          <li><strong>Pay Approval Created</strong> (`TimesheetPayReturn.Insert`) — Fired when a timesheet's pay approval is recorded</li>
          <li><strong>Pay Approval Updated</strong> (`TimesheetPayReturn.Update`) — Fired when a timesheet's pay-approval status changes</li>
          <li><strong>Pay Approval Deleted</strong> (`TimesheetPayReturn.Delete`) — Fired when a pay-approval record is removed</li>
        </ul>
      </div>
    </Step>

    <Step title="Timesheet export events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events on timesheet exports to a third-party or payroll system.</p>

        <ul>
          <li><strong>Export Started</strong> (`TimesheetExport.Begin`) — Fired when a timesheet export begins</li>
          <li><strong>Export Finished</strong> (`TimesheetExport.End`) — Fired when a timesheet export completes</li>
        </ul>
      </div>
    </Step>

    <Step title="Leave events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events on employee leave records, such as annual leave.</p>

        <ul>
          <li><strong>Leave Created</strong> (`Leave.Insert`) — Fired when a leave request is created</li>
          <li><strong>Leave Updated</strong> (`Leave.Update`) — Fired when a leave request changes (for example, it is approved)</li>
          <li><strong>Leave Deleted</strong> (`Leave.Delete`) — Fired when a leave request is removed</li>
        </ul>
      </div>
    </Step>

    <Step title="Task events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events on tasks assigned to employees.</p>

        <ul>
          <li><strong>Task Created</strong> (`Task.Insert`) — Fired when a task is created</li>
          <li><strong>Task Updated</strong> (`Task.Update`) — Fired when a task changes</li>
          <li><strong>Task Deleted</strong> (`Task.Delete`) — Fired when a task is deleted</li>
        </ul>
      </div>
    </Step>

    <Step title="News feed events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events on posts in the Deputy news feed (called Memos in the API).</p>

        <ul>
          <li><strong>Post Created</strong> (`Memo.Insert`) — Fired when a news feed post is created</li>
          <li><strong>Post Updated</strong> (`Memo.Update`) — Fired when a news feed post is edited</li>
          <li><strong>Post Deleted</strong> (`Memo.Delete`) — Fired when a news feed post is deleted</li>
        </ul>
      </div>
    </Step>

    <Step title="Comment events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events on comments made against items such as the news feed.</p>

        <ul>
          <li><strong>Comment Created</strong> (`Comment.Insert`) — Fired when a comment is added</li>
          <li><strong>Comment Updated</strong> (`Comment.Update`) — Fired when a comment is edited</li>
          <li><strong>Comment Deleted</strong> (`Comment.Delete`) — Fired when a comment is deleted</li>
        </ul>
      </div>
    </Step>

    <Step title="Training record events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events on training assigned to employees.</p>

        <ul>
          <li><strong>Training Record Created</strong> (`TrainingRecord.Insert`) — Fired when training is assigned to an employee</li>
          <li><strong>Training Record Updated</strong> (`TrainingRecord.Update`) — Fired when a training record changes</li>
          <li><strong>Training Record Deleted</strong> (`TrainingRecord.Delete`) — Fired when a training record is removed</li>
        </ul>
      </div>
    </Step>

    <Step title="Account activity events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Account-level activity events.</p>

        <ul>
          <li><strong>User Login</strong> (`User.Login`) — Fired when a user logs in to Deputy</li>
          <li><strong>Device Registration</strong> (`Device.Registration`) — Fired when a new device (kiosk tablet or mobile app) connects to the installation</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Delivery format</h2>

  <p>Details of how Deputy delivers events to StackOne.</p>

  <Steps>
    <Step title="JSON payloads">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Deputy delivers each event as its own HTTP POST with a JSON body of the form `{ "topic": "<Resource>.<Action>", "data": { ... } }` — `topic` is the event name (for example `Employee.Insert`) and `data` is the affected record (its `Id` is used as the event ID). Deputy sends one event per request; deliveries are not batched.</p>
      </div>
    </Step>

    <Step title="Headers and signature">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Each delivery includes `X-Deputy-Webhook-Callback` (the webhook's resource URL) and `X-Deputy-Generation-Time` (a Unix timestamp). On Enterprise installations Deputy also adds `X-Deputy-Secret`, an HMAC-SHA256 signature of the payload.</p>
      </div>
    </Step>

    <Step title="Timing and retries">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Deputy queues webhook deliveries, so an event can arrive seconds to minutes after the change. StackOne responds with `200 OK` automatically.</p>
      </div>
    </Step>
  </Steps>
</section>

## Verify

Your Connector should now be able to receive and process events. Try triggering an event and you should see an Event appear in the Connector logs.
