feat(KNO-11417): Docs for Update User / Tenant / Object#1310
feat(KNO-11417): Docs for Update User / Tenant / Object#1310andy-knock wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| ### Function steps | ||
|
|
||
| A function is a step in a workflow that does something to the data being passed in your trigger call. You can use functions by entering the workflow builder and adding function steps onto the canvas. | ||
| A function is a step in a workflow that does something to the data being passed in your trigger call. You can use functions by entering the workflow builder and adding function steps onto the canvas. In the workflow builder, functions are grouped in tabs. The **Data functions** tab includes steps that update data in Knock during a workflow run. |
There was a problem hiding this comment.
phrasing check here about the differences of Data functions.
| section: Designing workflows | ||
| --- | ||
|
|
||
| The **Data functions** tab in the workflow builder includes three steps that update data in Knock during a workflow run: **Update user**, **Update tenant**, and **Update object**. They all work the same except Update object doesnt't support "Current object" mode. Use them when you need to change a [user](/concepts/users), [tenant](/concepts/tenants), or [object](/concepts/objects) based on workflow context so that downstream steps, [audiences](/concepts/audiences), or other workflows see the updated data. |
There was a problem hiding this comment.
"They all work the same except Update object doesnt't support "Current object" mode"
phrasing check.
I do think its more efficient to talk about all 3 steps on 1 docs page
|
|
||
| The **Data functions** tab in the workflow builder includes three steps that update data in Knock during a workflow run: **Update user**, **Update tenant**, and **Update object**. They all work the same except Update object doesnt't support "Current object" mode. Use them when you need to change a [user](/concepts/users), [tenant](/concepts/tenants), or [object](/concepts/objects) based on workflow context so that downstream steps, [audiences](/concepts/audiences), or other workflows see the updated data. | ||
|
|
||
| Common use cases include syncing state from your trigger (for example, "last notified at" on a user, approval status on a tenant, or status on an object), making a user eligible for a dynamic audience or [guide](/concepts/guides), updating [preferences](/preferences/overview) or [tenant-level preference defaults](/preferences/tenant-preferences), or storing channel data (for example, a Slack channel id on an object). |
There was a problem hiding this comment.
these examples come from the notion doc
https://www.notion.so/knockapp/New-workflow-functions-2c6c5a20997880538f30d460cd5f0304
|
|
||
| ## Debugging | ||
|
|
||
| You can use the [workflow run logs](/send-notifications/debugging-workflows) to debug these steps. The logs capture the change made by the step so you can verify the pre-state, the properties that were set, and the post-state. |
There was a problem hiding this comment.
Edit this to align with the final logging behavior.
| section: Designing workflows | ||
| --- | ||
|
|
||
| The **Data functions** tab in the workflow builder includes three steps that update data in Knock during a workflow run: **Update user**, **Update tenant**, and **Update object**. They all work the same except Update object doesnt't support "Current object" mode. Use them when you need to change a [user](/concepts/users), [tenant](/concepts/tenants), or [object](/concepts/objects) based on workflow context so that downstream steps, [audiences](/concepts/audiences), or other workflows see the updated data. |
There was a problem hiding this comment.
| The **Data functions** tab in the workflow builder includes three steps that update data in Knock during a workflow run: **Update user**, **Update tenant**, and **Update object**. They all work the same except Update object doesnt't support "Current object" mode. Use them when you need to change a [user](/concepts/users), [tenant](/concepts/tenants), or [object](/concepts/objects) based on workflow context so that downstream steps, [audiences](/concepts/audiences), or other workflows see the updated data. | |
| The **Data functions** tab in the workflow builder includes three steps that update data in Knock during a workflow run: **Update user**, **Update tenant**, and **Update object**. Use them when you need to change a [user](/concepts/users), [tenant](/concepts/tenants), or [object](/concepts/objects) based on workflow context so that downstream steps, [audiences](/concepts/audiences), or other workflows see the updated data. |
I think you can actually leave this out since you mention it below in object-specific section.
|
|
||
| How you specify which entity to update depends on the step type. | ||
|
|
||
| ### Update user and Update tenant |
There was a problem hiding this comment.
Feels like you could break these into their own headings so users, tenants, and objects all have an 'on this page' entry.
|
|
||
| In the step editor you can edit properties as a JSON blob or in key-value form. Updated properties are stored in Knock and are available to subsequent workflow steps and to the Management API. | ||
|
|
||
| ### Updating user preferences (Update user only) |
There was a problem hiding this comment.
Could nest this under update user section so all that info is self-contained
Description
Add docs for Update User, Update Tenant, Update Object steps
NOTE: I will not ship this PR till we actually launch the feature, only publishing it for review / revision.
Screenshots