Skip to content

Commit

Permalink
chore(kno-4752): clarify inline identify requires id fields
Browse files Browse the repository at this point in the history
  • Loading branch information
brentjanderson committed Nov 30, 2023
1 parent 22d18fe commit e2e5844
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion content/managing-recipients/identifying-recipients.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ While identifying individual recipients is useful, you may also need to identify

It's also possible to inline identify recipients while issuing calls to certain resources within Knock. Inline identifying will always upsert the recipients being passed in before executing the remainder of the request. This can be useful for ensuring that your recipients exist within Knock before executing calls that reference those recipients.

You can also inline identify actors in the same way.

Inline identification works with any endpoint that accepts a list of recipients:

- [Workflow triggers](/reference#trigger-workflow)
Expand All @@ -67,7 +69,7 @@ When passing a set of recipients to be inline identified, Knock will guarantee t

## Setting properties while identifying recipients

When identifying recipients you pass a set of properties for the recipient that are persisted. No properties on the recipient are required, although there are some reserved property names for recipients that have special meaning:
When identifying recipients you pass a set of properties for the recipient that are persisted. No properties on the recipient are required except for `id`. Generally, the best practice here is to use your internal identifier for your users as the `id`. There are some reserved property names for recipients that have special meaning:

- `name`: The given name of the recipient
- `email`: A valid email address to deliver email notifications to
Expand Down
2 changes: 2 additions & 0 deletions content/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,8 @@ A trigger calls a workflow created via the Knock dashboard.

In the `recipients` and `actor` fields in a trigger call, you can optionally include maps full of properties describing a user or an object. These can be properties describing a brand new user/object, or properties describing an update to an existing one. When this data is present in a notify call, Knock will persist it as part of processing the workflow. This is comparable to direct calls to the [identify user](#identify-user) or [set object](#set-object) APIs.

Each recipient and actor must have an `id` field set in addition to other properties (e.g. email, name, or phone number).

See our guides on inline identification [for users](/send-and-manage-data/users#3-inline-identification) and [for objects](/send-and-manage-data/objects#3-set-objects-inline) for more details on this use case.

### Endpoint
Expand Down

0 comments on commit e2e5844

Please sign in to comment.