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.
Name | Type | Description |
---|---|---|
trackingCode | string | The tracking ID of the rating given in an answer |
value | integer | The rating given by the end user |
Name | Type | Description |
---|---|---|
comment | string | Additional comment to be sent along with the rating |
This method calls the Chat 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 Chat API Routes page for the response format.
const trackingCode = <tracking_code>; // Tracking code can be obtained from the 'conversation' method response
chatbot.api.rateContent(trackingCode, "5");