Comment GraphQL API Overview
Authors:
Girish Padmanabha, Kirill Gaiduk
Changed on:
6 Dec 2024
Overview
The Comment GraphQL API allows customers to manage Comments across various Entities.
Multiple Comments can be added against the same Entity, with each Comment automatically capturing:
- The timestamp
- The User who created it
This feature allows Users to record specific business actions and events, providing a comprehensive history of interactions and updates.
Key points
- Add Comments to any Entity Type, enabling detailed documentation of business actions
- Specific Permissions are required for Comment operations
- Use the and
`createComment`
Mutations to manage Comments`updateComment`
- Use the and
`commentById`
Queries to retrieve Comments`comments`
What are Comments for?
A Comment provides an additional piece of information to the Entity it is related to.
When creating a Comment, you can associate it with:
- An Entity Type
- Entity Id or Entity Reference
Making it retrievable via the `comments`
Permissions
The following Permissions are required for different operations on Comments:
`COMMENT_CREATE`
`COMMENT_UPDATE`
`COMMENT_VIEW`
Features
The Comment GraphQL API enables the following functionality:
- Create Comment
TheMutation allows the creation of a Comment against a known Entity.`createComment`
- Update Comment
TheMutation allows for the updating of an existing Comment object.`updateComment`
- Get Comment by Id
TheQuery retrieves a Comment based on a provided Id.`commentById`
- Query Comments
TheQuery retrieves Comments based on various filter criteria.`comments`
Reference Usage
Here is a collection of common scenarios for the Comment GraphQL API usage:
- Order Entity:
- Customer service representatives can add Comments regarding customer interactions or actions taken on an Order
- Comments can document the business status updates or any issues related to the Order processing
- Fulfillment Entity:
- Store Users can add Comments when fulfilling Orders, noting any special instructions or issues encountered during the fulfillment process
- Credit Memo Entity:
- Financial teams can document reasons for issuing Credit Memos and any follow-up actions required
- Return Order Entity:
- Comments can be added detailing the reasons for Returns and the steps taken to process them
- Location Entity:
- Store managers can add Comments about:
- Inventory status
- Store operations
- Or any Location-specific updates
- Store managers can add Comments about:
This flexibility allows the capture of essential information at various stages of business processes, ensuring that all relevant data is saved and can be retrieved when needed.