cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

583
Views
0
Helpful
4
Replies
Chris Bomba
Enthusiast

UCCX set block with Java email body not sending new lines

I am using a set step to build an email body via the following block for a post call survey email.  In my testing, I am just running this in a script that just sends and email until I get it all worked out.  When the email gets to the recipient, the new lines start off okay but then go down hill and it seems like UCCX or Outlook gives up and stops showing the new lines.  

 

{
StringBuffer myBuf = new StringBuffer();
String newLine = System.getProperty("line.separator");
myBuf.append("The results for the following survey are as follows:"  + newLine + newLine);
myBuf.append("Calling Number:"  + newLine);
myBuf.append("Queue:"  + newLine);
myBuf.append("Agent who fielded the call:"  + newLine);
myBuf.append("Duration of the call:"  + newLine + newLine);
myBuf.append("Results:" + newLine);
myBuf.append("Resolve a Problem (1 Yes, 2 No)"  + " - "  + newLine);
myBuf.append("First Time Call (1 Yes, 2 No)"  + " - "  + newLine);
myBuf.append("Inquiry Resolved (1 Yes, 2 No)"  + " - "  + newLine + newLine);
myBuf.append("CSR Results:" + newLine);
myBuf.append("Taking Ownership (1 Bad, 5 Good)"  + " - " + newLine);
myBuf.append("Knowledge Level (1 Bad, 5 Good)"  + " - "  + newLine);
myBuf.append("Speed of Understanding (1 Bad, 5 Good)"  + " - " + newLine);
myBuf.append("Accuracy of Information (1 Bad, 5 Good)"  + " - " + newLine);
myBuf.append("Response Time (1 Bad, 5 Good)"  + " - " + newLine);
myBuf.append("Confidence in Answer (1 Bad, 5 Good)"  + " - " + newLine + newLine);

Date date = new Date();
myBuf.append(new Date().toString());
return myBuf.toString();	
}

 

Email received: 

 

 

The results for the following survey are as follows:

 

Calling Number:

Queue:

Agent who fielded the call:

Duration of the call:

 

Results:

Resolve a Problem (1 Yes, 2 No) -

First Time Call (1 Yes, 2 No) -

Inquiry Resolved (1 Yes, 2 No) -

 

CSR Results:

Taking Ownership (1 Bad, 5 Good) -

Knowledge Level (1 Bad, 5 Good) -

Speed of Understanding (1 Bad, 5 Good) - Accuracy of Information (1 Bad, 5 Good) - Response Time (1 Bad, 5 Good) - Confidence in Answer (1 Bad, 5 Good) -

 

 

As you can see that the Speed to Confidence aren't on their own lines.

1 ACCEPTED SOLUTION

Accepted Solutions

Ha, that makes no sense. There muse be some bug in the CCX engine, but to get over the hump for you I would just include the whole text in a single line and see if that yields what you want. It's going to be tough to read, but it's the end result that matters.

 

david

View solution in original post

4 REPLIES 4
david.macias
VIP Advocate

Everything looks right. If you move the end block of text to the beginning do the new lines appear?

 

david

 

I changed them around and now I get no new lines

 

{
StringBuffer myBuf = new StringBuffer();
String newLine = System.getProperty("line.separator");
Date date = new Date();
myBuf.append("The results for the following survey are as follows:"  + newLine + newLine);
myBuf.append("Calling Number:" + newLine);
myBuf.append("Queue:" + newLine);
myBuf.append("Agent who fielded the call:" + newLine);
myBuf.append("Duration of the call:" + newLine + newLine);
myBuf.append("Results:" + newLine);
myBuf.append("Resolve a Problem (1 Yes, 2 No) - " + newLine);
myBuf.append("First Time Call (1 Yes, 2 No) - " + newLine);
myBuf.append("Inquiry Resolved (1 Yes, 2 No) - " + newLine + newLine);
myBuf.append("CSR Results:" + newLine);
myBuf.append("Speed of Understanding (1 Bad, 5 Good) - " + newLine);
myBuf.append("Accuracy of Information (1 Bad, 5 Good) - " + newLine);
myBuf.append("Response Time (1 Bad, 5 Good) - " + newLine);
myBuf.append("Confidence in Answer (1 Bad, 5 Good) - " + newLine);
myBuf.append("Taking Ownership (1 Bad, 5 Good) - " + newLine);
myBuf.append("Knowledge Level (1 Bad, 5 Good) - " + newLine + newLine);
myBuf.append(new Date().toString());
return myBuf.toString();	
}

 

Email received:

 

The results for the following survey are as follows:

 

Calling Number:

Queue:

Agent who fielded the call:

Duration of the call:

 

Results:

Resolve a Problem (1 Yes, 2 No) -

First Time Call (1 Yes, 2 No) -

Inquiry Resolved (1 Yes, 2 No) -

 

CSR Results:

Speed of Understanding (1 Bad, 5 Good) - Accuracy of Information (1 Bad, 5 Good) - Response Time (1 Bad, 5 Good) - Confidence in Answer (1 Bad, 5 Good) - Taking Ownership (1 Bad, 5 Good) - Knowledge Level (1 Bad, 5 Good) -

 

Mon Aug 02 09:22:42 EDT 2021

 

 

Ha, that makes no sense. There muse be some bug in the CCX engine, but to get over the hump for you I would just include the whole text in a single line and see if that yields what you want. It's going to be tough to read, but it's the end result that matters.

 

david

View solution in original post

I changed everything to one word and that seems to have done the trick.  Definitely has to do with the spaces in some of the lines, " of ".  

 

{
StringBuffer myBuf = new StringBuffer();
String newLine = System.getProperty("line.separator");
myBuf.append("The results for the following survey are as follows:" + newLine + newLine);
myBuf.append("Calling Number: " + sANI + newLine);
myBuf.append("Queue: " + sCSQ + newLine);
myBuf.append("Agent: " + sAgentDisplay + newLine);
myBuf.append("Duration: " + iCallDuration_Parsed_Min + " minute(s) and " + iCallDuration_Parsed_Sec + " second(s)" + newLine + newLine);
myBuf.append("Results:" + newLine);
myBuf.append("Resolve a Problem (1 Yes, 2 No) - " + sResolveProblemResult + newLine);
myBuf.append("First Time Call (1 Yes, 2 No) - " + sFirstTimeResult + newLine);
myBuf.append("Inquiry Resolved (1 Yes, 2 No) - " + sCompletelyResolvedResult + newLine + newLine);
myBuf.append("CSR Results:" + newLine);
myBuf.append("Ownership (1 Bad, 5 Good) - " + sCSRQ1Result + newLine);
myBuf.append("Knowledge (1 Bad, 5 Good)  - " + sCSRQ2Result + newLine);
myBuf.append("Understanding (1 Bad, 5 Good) - " + sCSRQ3Result + newLine);
myBuf.append("Accuracy (1 Bad, 5 Good) - " + sCSRQ4Result + newLine);
myBuf.append("Response (1 Bad, 5 Good) - " + sCSRQ5Result + newLine);
myBuf.append("Confidence (1 Bad, 5 Good) - " + sCSRQ6Result + newLine);
myBuf.append("Professionalism (1 Bad, 5 Good) - " + sCSRQ7Result + newLine);
myBuf.append("Effort (1 Bad, 5 Good) - " + sFinalQuestionResult + newLine + newLine);
Date date = new Date();
myBuf.append(new Date().toString());
return myBuf.toString();	
}

 

 

Create
Recognize Your Peers
Content for Community-Ad