Sample Flows

Turn off guest commenting for a category to avoid spam

If you notice spam from site visitors, you can turn off guest commenting to allow only site members to comment.

To restrict commenting to members only, call Update Category to modify permissionsSettings.createComment.role and permissionsSettings.createReply.role to "MEMBER".

Retrieve all recent comments from a specific category

You can retrieve recent comments written across all blog posts or product pages. Use this to display recent activity to site visitors.

  1. Call Query Category to retrieve a list of categories available for a site and find the categoryId for the category you want to highlight.

  2. Call List Comments By Resource with the categoryId retrieved above as the contextId and commentSort.order set to "NEWEST_FIRST".

Restrict permissions for replies to comments on product pages

Allow any site visitor to leave a comment on any product page, but restrict replies to these comments to only site administrators.

To restrict these replies, call Update Category and modify permissionsSettings.createReply.role to "ADMIN".

Did this help?