FeedbackResource

The Feedback resource provides the ability to send user feedback to InService.

Customization Points

ClassDescription
com.ptc.sc.services.plugins.FeedbackDelegate You can implement a custom FeedbackDelegate to modify the default feedback behavior of emailing the feedback to the submitter and the SC_FEEDBACK_RECIPIENT preference, which is a comma delimited string of email addresses.

The following resources are applicable:

POST /feedback

Submits a user's feedback to the system via the registered FeedbackDelegate. And persists the feedback

This service takes an SCList that has one SCItem containing all of the form input parameters from the Feedback UI as attributes. It uses these input parameters to send the feedback mail.

The default FeedbackDelegate supports the following fields.

commentsThe feedback comments.
emailThe user's email address.
mobile_phoneThe user's mobile phone number.
priority The priority of the feedback.

This value is an integer with the following meanings.

1 = High
2 = Medium
3 = Low

Priority value can be customized.
contextId A string representing the SCId of the serial number filter or product.
itemId A string representing the SCId of the item where feedback was created.
itemParentId A string representing the SCId of the item's parent.
breadcrumbPath A string representing breadcrumb path of the context where feedback was created.

Request Body

media type data type description
application/vnd.ptc.sc+json SCList (JSON) The SCList containing the feedback item to be sent.

Response Codes

code condition
200 Returned if feedback was successfully submitted.
500 Returned if feedback was NOT submitted.

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)

POST /feedback

Submits a MultiPart user's feedback to the system via the registered FeedbackDelegate. And persists the feedback

This service takes an MultipartFormDataInput that has one SCItem containing all of the form input parameters from the Feedback UI as attributes and the attachments which the user want's to attach for the feedback. It uses these input parameters to send the feedback mail.

The default FeedbackDelegate supports the following fields.

commentsThe feedback comments.
emailThe user's email address.
mobile_phoneThe user's mobile phone number.
priority The priority of the feedback.

This value is an integer with the following meanings.

1 = High
2 = Medium
3 = Low

Priority value can be customized.
contextId A string representing the SCId of the serial number filter or product.
itemId A string representing the SCId of the item where feedback was created.
itemParentId A string representing the SCId of the item's parent.
breadcrumbPath A string representing breadcrumb path of the context where feedback was created.

Request Body

media type data type description
multipart/form-data (custom) The MultipartFormDataInput containing the feedback item to be sent and the attachments.

Response Codes

code condition
200 Returned if feedback was successfully submitted.
500 Returned if feedback was NOT successfully submitted.
400 Returned if the input is not in the correct format.
415 Unsupported media type.

Response Body

media type data type
application/vnd.ptc.sc+json object (JSON)
Available Since
InService 6.0

GET /feedback/{feedbackId}

Retrieves a specific feedback by the given feedback ID.

Available Since
InService 6.0

Request Parameters

name type description default
feedbackId path the ID of the feedback to retrieve n/a

Response Codes

code condition
400 returned when the feedbackId is not of valid ID for a feedback
404 returned when a feedback is not found for the given feedback ID

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)
Available Since
InService 6.0

GET /feedback

Retrieves all the feedbacks for the user.

Available Since
InService 6.0

Request Parameters

name type description default
$expand query the OData expand clause used to expand attribute objects and collections.

To expand the items collection when requesting the feedback use: $expand=items

n/a
$filter query -- Reserved for future use. -- n/a
$orderby query the ordering of feedback items when expanding items n/a
$skip query the number of feedback items to skip for paging when expanding items n/a
$top query the number of feedback items to return in a page when expanding items n/a

Response Codes

code condition
400 returned when the feedbackId is not of valid ID for a feedback
404 returned when a feedback is not found for the given feedback ID

Response Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)

GET /feedback/get_all_ids

Retrieves all feedback ids for the given user. This does not return serialized feedbacks, it returns an SCList of ids.

Response Body

media type data type
application/vnd.ptc.sc+json array of object (JSON)

DELETE /feedback/{feedbackId}

Deletes the specified feedback.

Request Parameters

name type description default
feedbackId path The ID of the feedback to be deleted. n/a

Response Codes

code condition
204 Returned if the feedback was successfully deleted.
400 Returned when a feedbackId is not of valid ID format.
404 Returned when a feedback is not found for the given feedback ID.

Response Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)

POST /feedback/remove

Delete a list of given feedbacks.

Request Parameters

name type description default
Content-Type header The content type with the correct version parameter. n/a

Request Body

media type data type description
application/vnd.ptc.sc+json SCList (JSON) The SCList of feedbacks to be deleted.

Response Codes

code condition
204 Returned if a list of feedbacks were successfully deleted.
400 Returned when the content does not contain data or the cartId of any item in the SCList is not of valid ID format.
404 Returned when a feedbackId is not of valid ID format.
415 Returned if the Content-Type is not application/vnd.ptc.sc+json;version=1.

Response Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)

GET /feedback/{feedbackId}/media/{fileName}

Streams Attachment content to a client.

Request Parameters

name type description default
feedbackId path The Id of the Feedback object to retrieve. n/a
fileName path This is an actual file name, it will be used to select the appropriate ContentItem on the Feedback object. n/a

Response Codes

code condition
404 When Feedback object is not found.
400 When the incoming feedbackId is invalid.
406 If the client Accept header it too restrictive for the type of content being requested.

Response Body

media type data type
application/json object (JSON)
application/xml anyType (XML)