Skip to main content
Use survey notifications to invite a known respondent list, remind people who have not started, or send a transcript after completion. An immediate delivery sends messages now, a schedule sends them at a chosen time, and a callback sends them in response to an event such as survey completion. HumanSurveyNotificationHandler keeps these operations associated with one hosted survey. Creating the handler does not send a message; the send, schedule, and callback methods below perform the corresponding action.
The survey must have an agent list with an email delivery channel configured before any notifications can be sent. Build a job with survey.by(agents) and pass delivery_map to its .humanize() method. See Respondent lists for the construction workflow.
The examples below operate on an existing hosted survey. Send and schedule calls contact the service and can deliver real messages to its respondents. Replace placeholder identifiers with values returned by your own survey workflow.

Getting a handler

A Coop client is created automatically. Pass one explicitly if you need a specific API key or base URL:

Statuses

A delivery can contain one email task per selected respondent. Its dispatch and delivery statuses describe the message; the respondent’s response status describes participation. A delivered invitation therefore does not mean a completed survey.

Dispatch status

Controls whether the platform has attempted to hand off the message to the downstream channel (e.g. the email provider).

Delivery status

Reflects what the email provider reports back after dispatch.

Response status

Tracks whether a respondent has engaged with the survey itself.

Quickstart examples

Send an email right now

Trigger an immediate delivery to all respondents.
Pass a custom subject, HTML email body, or restrict which respondents receive it:

Schedule a one-time email

Schedule a single delivery at a specific time. run_at must be a timezone-aware datetime or an ISO 8601 string.
Update the time before it fires:

Schedule recurring emails (cron)

Send emails on a repeating schedule using standard cron syntax. Provide either max_jobs (fire at most N times) or deadline (stop firing after this datetime) as the termination condition. Use start_at to delay when the schedule begins firing; omit it to start immediately.
With a deadline instead:
With a delayed start:
Pause and resume a schedule:

React when someone completes the survey (callback)

A respondent is a person with a corresponding entry in the survey’s agent list. Each respondent has a unique survey link and a tracked response status. Submissions from people outside the agent list (e.g. anonymous links) are not associated with a respondent. create_callback sends emails to respondents in your agent list. Two respondent event types are supported:
Limit how many times the callback fires (e.g. only notify for the first 100 completions):

Notify the owner on every new response

Use create_owner_response_callback to email the survey owner each time a response is submitted. This fires for all responses, including anonymous ones — not just respondents in the agent list.

Send a transcript after each submission

Use create_transcript_callback to automatically email a transcript each time a response is submitted. Pass recipient to control who receives it:
  • "respondent" (default) — emails each respondent a copy of their own answers.
  • "owner" — emails the survey owner a copy of the answers. Fires for all submissions, including anonymous ones.
Activate and deactivate:

Filter which respondents receive a delivery

HumanizeRespondentFilter lets you compose conditions to target specific subsets of respondents. Conditions can be nested with and / or operators.
Available condition fields:

Check delivery status

List all delivery jobs for the survey:
Inspect a specific delivery job:
Drill into individual tasks (one per respondent per delivery):
Get a single delivery task by UUID:

Route types

Each delivery or schedule sends email to survey respondents via a RespondentEmailRouteConfig route. A delivery template is always required; convenience methods like send_respondent_email default to the built-in invitation template when none is provided. RespondentEmailRouteConfig options:

Template variables

Custom HTML templates support the following variables, which are filled in per-respondent at send time: Example:
Update the subject and template on an existing respondent email route on a schedule:
Update the subject and template on an existing respondent email route on a callback:

Find and revise schedules and callbacks

The handler keeps the human survey UUID, so these methods only need the identifier of the schedule, callback, or route: Deactivating a schedule or callback pauses future triggers without deleting its configuration. Deletion removes it. Adding or changing active routes affects future deliveries, so review recipients and templates first. Listing methods return one page; use their pagination metadata to request subsequent pages. list_deliveries(), list_delivery_tasks(), and get_respondents() also accept page and page_size.

Managing respondents

List all respondents and their current response status:
Check and update the agent list delivery configuration (the trait column that holds each respondent’s email address):