The purpose of this article is to provide guidance for clients who have been impacted by an issue that prevented the Unbabel Chat Translated Transcript to be correctly populated. It outlines the steps required to execute a script that will invoke our job for a designated set of IDs or a specified date range.
Steps
1 - To do this we are going to run a job using the salesforce developer console.
2 -
On salesforce open the developer console
3 - Press Debug, then open select the options “Open Execute Anonymous Window”
4 - This will open a new window.
5 - Now we have two options:
- Specify a date range. This will try to populate missing transcripts in all chat transcript objects created in the specified range.
- Specify a set of Ids (only consider this option if you are familiar with apex code). This will try to populate missing transcripts in all listed chat transcript objects.
6 - Let’s start by option a) , specifying a date range.
- We are going to paste the following bit of code:
Datetime startDate = Datetime.newInstance(2023, 01, 01);
Datetime endDate = Datetime.newInstance(2023, 04, 01);
Id batchId = Database.executeBatch(new UnbabelChatTranscriptBatch(startDate, endDate), 100);
- Replace the start and end date values to the desired date range following the YYYY,MM,DD format.
- Press execute.
7 - You can check for the job running under Setup > Jobs > Apex Jobs, once completed, all transcripts should be populated.
8 - Now let's check option b) provide an id set of ids
- On the developer console anonymous window paste the following sample of code:
Set<Id> chatTranscriptIds = new Set<Id>{
'5707a000000MoJJAA0',
'5707a000000MoJKAA0',
'5707a000000MoJLAA0',
'5707a000000MoJMAA0',
'5707a000000MoJNAA0'
};
Id batchId = Database.executeBatch(new UnbabelChatTranscriptBatch(chatTranscriptIds), 100);
- Populate the ids of the chatTranscriptIds variable as desired.
-
Press execute.
9 - Like above, you can check for the job running under Setup > Jobs > Apex Jobs, once completed, all transcripts should be populated.
Comments
0 comments
Please sign in to leave a comment.