You need to sign in to do that
Don't have an account?

How to get Live Chat Transcripts data through RESTClient
Hello
Req: get the Live Chat Transcripts data through case id:
I was struck at Live Chat Transcripts data display through RESTClient. Return empty data
But it should return Live Chat Transcripts data in workbench
Please find below webservice class for get Live Chat Transcripts data
@RestResource(urlMapping='/ChatDetails/*')
global with sharing class ChatDetails {
@HttpGet
global static List<LiveChatTranscript> chatDetails() {
String caseId= RestContext.request.params.get('caseId');
system.debug('caseId' +caseId);
// Get the chat details for the supplied case in the request. List<LiveChatTranscript> chatDetails = [select id, body from LiveChatTranscript where Case.id=:caseId];
// system.debug('chatDetails : '+chatDetails[0].Body);
return chatDetails;
}
}
Through Workbench output:
Output of workbench
API URL: /services/apexrest/ChatDetails?caseId=5007F000000nPuoQAE
5707F0000004qkHQAQ
attributes
Id: 5707F0000004qkHQAQ
Body: <p align="center">Chat Started: Wednesday, June 28, 2017, 06:11:27 (-0700)</p><p align="center">Chat Origin: Chat Button</p><p align="center">Agent salesforce a</p>( 2s ) salesforce admin: Welcome on Live Chat!!!<br>( 9s ) salesforce admin: Hi<br>( 18s ) Visitor: Hi<br>( 25s ) salesforce admin: How can i help you<br>( 26s ) Visitor: How are you <br>( 30s ) salesforce admin: Good<br>( 52s ) Visitor: https://i.diawi.com/RipmcC<br>
CaseId: 5007F000000nPuoQAE
Through RESTClient output:
API URL: http://csscorpvp-developer-edition.ap5.force.com/gadet//services/apexrest/ChatDetails?caseId=5007F000000nPuoQAE
HTTP/1.1 200 OK. But Empty display. No data.
Kindly let us know how to get the Live Chat Transcripts data .
Any help will be appreciated.
Regards
Tirumala
Req: get the Live Chat Transcripts data through case id:
I was struck at Live Chat Transcripts data display through RESTClient. Return empty data
But it should return Live Chat Transcripts data in workbench
Please find below webservice class for get Live Chat Transcripts data
@RestResource(urlMapping='/ChatDetails/*')
global with sharing class ChatDetails {
@HttpGet
global static List<LiveChatTranscript> chatDetails() {
String caseId= RestContext.request.params.get('caseId');
system.debug('caseId' +caseId);
// Get the chat details for the supplied case in the request. List<LiveChatTranscript> chatDetails = [select id, body from LiveChatTranscript where Case.id=:caseId];
// system.debug('chatDetails : '+chatDetails[0].Body);
return chatDetails;
}
}
Through Workbench output:
Output of workbench
API URL: /services/apexrest/ChatDetails?caseId=5007F000000nPuoQAE
5707F0000004qkHQAQ
attributes
Id: 5707F0000004qkHQAQ
Body: <p align="center">Chat Started: Wednesday, June 28, 2017, 06:11:27 (-0700)</p><p align="center">Chat Origin: Chat Button</p><p align="center">Agent salesforce a</p>( 2s ) salesforce admin: Welcome on Live Chat!!!<br>( 9s ) salesforce admin: Hi<br>( 18s ) Visitor: Hi<br>( 25s ) salesforce admin: How can i help you<br>( 26s ) Visitor: How are you <br>( 30s ) salesforce admin: Good<br>( 52s ) Visitor: https://i.diawi.com/RipmcC<br>
CaseId: 5007F000000nPuoQAE
Through RESTClient output:
API URL: http://csscorpvp-developer-edition.ap5.force.com/gadet//services/apexrest/ChatDetails?caseId=5007F000000nPuoQAE
HTTP/1.1 200 OK. But Empty display. No data.
Kindly let us know how to get the Live Chat Transcripts data .
Any help will be appreciated.
Regards
Tirumala