> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Sample Flows

## Article: Sample Flows

## Article Link: https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/comments/comment-context/sample-flows.md

## Article Content:

# Sample Flows

This article presents possible use cases and corresponding sample flows that you can support.

## Render a comments UI that matches the caller's permissions

1. When a page with comments loads, call Get Comment Context with the page's `appId`, `contextId`, and
   `contextType`, using the site visitor's or member's authentication.
2. Use `permissions.viewContext` to decide whether to render the comments section at all.
3. Show or hide the comment box (`createComment`), reply (`createReply`), vote (`voteComment`),
   react (`reactToComment`), and report (`reportComment`) actions based on the resolved booleans.
4. For moderators and owners, `updateAnyComment`, `deleteAnyComment`, and `markComment` resolve to `true`,
   so the same call also drives moderation controls.

## Drive guest-comment and join-community UX

1. Call Get Comment Context with `fields: ["REGISTRATION_DATA"]` and read `registrationData`.
2. When `requireOwnerApproval` is `true`, explain to a signing-up visitor that a site admin must approve
   the account before commenting as a member.
3. When `requireEmailVerification` is `true`, prompt for email verification as part of the join flow.