Skip to content

Support the Pinpoint integration ​

The runbook for keeping Pinpoint hires flowing into Luna: what each alert means, how to recover from a failure, and how the switch from Workable to Pinpoint runs. It's for whoever is on support for onboarding.

How it fits together: Pinpoint calls POST /webhooks/pinpoint on the employee-gateway service. The gateway verifies the signature and publishes to <env>-pinpoint-event-received. That topic feeds <env>-onboarding-queue, which the onboarding subscriber (<env>-onboarding-subscriber-function) consumes. Every day at 02:00 UTC, the employee-gateway scheduler (<env>-employee-gateway-scheduler-function) also publishes a PINPOINT: POLL message to the same topic for each Hired application updated in the last 7 days. This catches start-date changes and hires the webhook missed. See the employee-gateway README for the event contract.

Alerts ​

The alarms publish to the centralised alert topics, so they land in the usual #<env>-error-alerts and #<env>-warning-alerts channels. Respond to them as the Monitoring and alerting standard describes.

AlarmLevelFires whenWhat to do
<env>-onboarding-deadletter-queue-count-alarmErrorA message is on <env>-onboarding-deadletter-queue, meaning it failed 5 timesRedrive the dead-letter queue
<env>-onboarding-queue-age-alarmWarningThe oldest message on <env>-onboarding-queue is 15 minutes old or moreCheck the subscriber logs for repeated failures. Expected while the subscriber is paused
<env>-employee-gateway-subscriber-function-pinpointsignaturefailure-alarmErrorA webhook request failed signature verificationCheck that the SSM signing secret matches Pinpoint's (see Rotate Pinpoint keys). A one-off failure can be a request that didn't come from Pinpoint

The queue is shared

<env>-onboarding-queue carries every onboarding message, not only Pinpoint ones. The queue alarms fire for any onboarding failure.

The dead-letter alarm stays in ALARM until the dead-letter queue is empty, so later failures don't post again. Drain the dead-letter queue promptly.

Expect the age alert about 20 to 25 minutes after the oldest message arrived, not at 15. The alarm uses 5-minute periods, and SQS metrics reach CloudWatch a few minutes late.

The age alarm can go back to OK while a failing message is still retrying, because SQS stops counting a message towards ApproximateAgeOfOldestMessage after its third receive (per the AWS docs, not tested here). That message then surfaces through the dead-letter alarm after its fifth receive, about an hour after it first arrived.

Other webhook failures (a body over the size cap, or a failed publish) are logged as errors, so they alert through the gateway's general error-log alarm instead.

Disabled-endpoint email ​

When Pinpoint exhausts its retries it disables the webhook endpoint. It raises no event, but its documentation says it emails every Pinpoint admin (not yet tested). To make sure the Luna team sees it, the Luna team's shared mailbox must be a Pinpoint admin on the production account. A Pinpoint admin sets this up. If Pinpoint won't give a mailbox an admin seat, a Luna team member who is an admin forwards that email to the shared mailbox with a mail rule.

Weekly webhook check ​

Until the first pilot hire lands in Luna, check once a week that the Luna webhook is still enabled in the production Pinpoint account's webhook settings. If it's disabled, re-enable it. Owner: named at handoff.

Redrive the dead-letter queue ​

The dead-letter queue keeps messages for 14 days.

  1. Find the cause. Read the subscriber logs around the failure time, or peek at the messages:

    bash
    aws sqs receive-message \
      --queue-url "https://sqs.eu-west-1.amazonaws.com/<account>/<env>-onboarding-deadletter-queue" \
      --max-number-of-messages 10 \
      --visibility-timeout 0
  2. Fix the cause and deploy the fix. A redrive before the fix just sends the messages straight back to the dead-letter queue.

  3. Redrive the messages to the source queue, either with Start DLQ redrive on the dead-letter queue in the SQS console, or:

    bash
    aws sqs start-message-move-task \
      --source-arn "arn:aws:sqs:eu-west-1:<account>:<env>-onboarding-deadletter-queue"
  4. Confirm the dead-letter queue is empty and the alarm goes back to OK.

A redriven Pinpoint hire is safe to process again. The hired flow checks for an existing ANDi and holds a create claim, so it doesn't make a duplicate.

Re-enable a disabled endpoint ​

  1. Find out why deliveries failed and fix that first. Search the employee-gateway subscriber logs (<env>-employee-gateway-subscriber-function) for:
    • Pinpoint webhook signature verification failed: Pinpoint got a 401 (see Rotate Pinpoint keys)
    • Pinpoint webhook body exceeds the size cap: Pinpoint got a 413
    • Failed to publish Pinpoint webhook event: Pinpoint got a 500
  2. In Pinpoint's webhook settings, turn the Luna webhook's enable switch back on.
  3. Recover what was missed. Events sent while the endpoint was disabled are lost.
    • Hires are recovered by the daily poll. At 02:00 UTC the employee-gateway scheduler re-queues every Hired application updated in the last 7 days, and the onboarding subscriber creates any ANDi that's missing. For an outage longer than 7 days, or to recover a hire sooner, ask the talent team to move the application out of Hired and back in, which sends the hire again.
    • Rejections and reversals are not recovered. List the applications rejected or moved out of Hired in Pinpoint during the outage, compare them with Hired ANDis in Luna, and correct those by hand.

Pause and resume the onboarding subscriber ​

Pause only for a subscriber fault that would otherwise send messages to the dead-letter queue. Pausing stops every onboarding message, not only Pinpoint ones.

bash
# Find the SQS trigger
aws lambda list-event-source-mappings \
  --function-name <env>-onboarding-subscriber-function \
  --query "EventSourceMappings[].UUID"

# Pause
aws lambda update-event-source-mapping --uuid <uuid> --no-enabled

# Resume (queued messages are then processed)
aws lambda update-event-source-mapping --uuid <uuid> --enabled

Pausing isn't instant. Check aws lambda get-event-source-mapping --uuid <uuid> --query State until it says Disabled. Even then, a message that arrives in the next 20 seconds or so can still be processed. That happened when this was tested on pulsar. The likely cause is a long poll that was already open, but this isn't confirmed in the AWS docs.

Resume within 14 days

<env>-onboarding-queue keeps messages for 14 days. Messages older than that are deleted, not dead-lettered.

While paused, the queue-age alarm fires. That's expected. It isn't verified whether a deploy of the onboarding stack re-enables the trigger, so after any deploy during a pause, check the mapping's state.

Cutover from Workable ​

Everything must work by the end of November 2026, and switching starts after that.

Go/no-go ​

  • [ ] Sandbox proof on a lower environment (polaris, sol or pulsar): hired, rejection and reversal from sandbox events.
  • [ ] The same build proven on staging.
  • [ ] Production set up but inert: the webhook registered with its signing secret in SSM, the subscriber running, no real application routed, and the "ANDi ID" field created in the production Pinpoint account.
  • [ ] Production smoke test passed.
  • [ ] The talent team's configuration checklist signed off.
  • [ ] The disabled-endpoint email reaches the Luna shared mailbox.
  • [ ] IT told that Pinpoint-sourced ANDis are about to arrive, and that failures alert in #production-error-alerts.
  • [ ] A named support owner.

Reversal

The gateway ignores a move out of Hired, so there's no reversal handler yet. Reversal can't be proven until one ships.

Production smoke test ​

There's no test mode, so use a real application:

  1. In the production Pinpoint account, create a clearly named test application (e.g. LUNA SMOKE TEST - do not process) and move it to Hired.
  2. Confirm a Hired ANDi appears in Luna and its ANDi id is written back to the application.
  3. Reject or delete the test application in Pinpoint before deleting the ANDi. Otherwise the next daily poll recreates the ANDi, because it re-queues Hired applications updated in the last 7 days.
  4. Delete the test ANDi by hand.

Switch ​

  1. Pilot job first, advertised only in Pinpoint.
  2. All new jobs move to Pinpoint after the pilot's first hire succeeds, or at a cap date set at switch time (suggested 2 weeks). At the cap date, accept a forced test hire or the smoke test as proof.

The talent team owns the switch date, the job postings and the choice of pilot job.

Drain ​

Workable candidates already in the pipeline finish in Workable, with the Zap, webhook route and poll left live. The drain closes at whichever comes first:

  • the Workable pipeline is empty, confirmed by the talent team; or
  • a cap date about 2 weeks before 31 December 2026.

A hire still in Workable after the Zap is gone is re-entered in Pinpoint by the talent team.

Rollback ​

Rollback means the talent team moves new jobs back to Workable. It is never a Luna deploy. The Pinpoint path stays live so in-flight Pinpoint hires can drain. Pause the subscriber only for a subscriber fault, then resume to replay.

Ownership ​

The Luna team owns monitoring through the drain. Name the owner here at handoff. Error-rate dashboards and a "no hires in N days" heartbeat are out of scope.

Made with ❤️ by the Luna team