Developers

RateContent

Usage

Use this method to log a rating using the trackingCode given in an answer, together with a value, and optionally a comment on the rating.

Mandatory parameters

Name Type Description
trackingCode string The tracking ID of the rating given in an answer
value integer The rating given by the end user

Optional parameters

Name Type Description
comment string Additional comment to be sent along with the rating

Response data format

This method calls the Chatbot API’s POST /inbtrck/events endpoint. It returns a Promise with the API response data. Please refer to the Responses section of the endpoint on the Chatbot API Routes page for the response format.

Example

const trackingCode = <tracking_code>; // Tracking code can be obtained from the 'conversation' method response
chatbot.api.rateContent(trackingCode, "5");