imopenlines.session.head.vote
Scope: catalog Permissions to execute: for all
Method for rating conversation by supervisor.
Parameters
Parameter | Example | Required | Description |
---|---|---|---|
SESSION_ID | 494 | Yes | Session ID. |
RATING | 5 | No | Star rating from 1 to 5. |
COMMENT | Great job | No | Supervisor comment. |
Attention: two parameters are optional, you must specify at least one of them.
Method call and response
JavaScript for Bitrix24 On-premise:
BX.rest.callMethod( 'imopenlines.session.head.vote', { SESSION_ID: 2047, RATING: 5, COMMENT: 'Text of comment' } ) .then(result => console.log(result.data())) .catch(result => console.warn(result.error().ex)) ;
JavaScript for Bitrix24 Cloud:
BX24.callMethod( 'imopenlines.session.head.vote', { CHAT_ID: 2024 }, function(result) { if(result.error()) { console.warn(result.error().ex); return false; } console.log(result.data()); } );
Response example:
true
Possible error codes
Code | Description |
---|---|
ACCESS_DENIED | Current user doesn't have access to the specified chat. |
CHAT_TYPE | Specified chat isn't an Open Channel. |
CHAT_ID | Chat ID is incorrect. |
WRONG_PARAMETER | At least one of optional parameters must be specified. |
© «Bitrix24», 2001-2024