SAP Knowledge Base Article - Public

3523068 - Response Template in Case Emails Starts with Blank Lines

Symptom

When inserting a template into a case mail, there is empty space in the beginning, before the template text.

Environment

SAP Service Cloud Version 2

Reproducing the Issue

  1. Go to the work center view Cases.
  2. Open any case.
  3. Go to Email.
  4. Click on Templates.
  5. Insert a template.

There is empty space at the beginning even though it is not present in the template itself when you open it.

Cause

This issue is happening because the template is using 'p' tags. You can see the tags if you open / edit the template with Notepad++ for example.
In HTML, 'p' tags, along with 'div' tags are blocking elements. 
This means that they always start on a new line. 
This is the reason the template is starting on a new line when inserted. 
(See for example https://www.w3schools.com/html/html_blocks.asp)

The existing behaviour is expected because it is in line with the expectations set by HTML and this cannot be changed from our side. 

Resolution

You could consider creating the template content without using 'p' or 'div' tags, and you can control the line breaks using 'br' tags instead.
You also have the option of using inline stylings to ensure that the starting 'p' block does not behave like a blocking element. 

You can use these options, or others, to get the required format in your template. If required, please check resources on HTML formatting tags.  

Keywords

case, email, template, space, break, extra line , KBA , CEC-CRM-CAS , Case Management for SAP Sales/Service Cloud , How To

Product

SAP Sales Cloud and SAP Service Cloud Version 2 1.0