We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Inbound emails being processed inconsistently across tables / truncated vs. Show full conversation

Viviane Clausen
Tera Contributor

Hi,

 

my desired situation is the follwoing:

- incoming email is being processed and full email body is stored

- email reply separator are used in order to detect conversation history

- a "Show full conversation" link is shown in the Activity Stream when an email reply separator matches

 

However, in our instance the behavior differs between emails connected to a Case (sn_customerservice_case) vs. to a Task (sn_customerservice_task):

 

-> For our Task table, the situation is as desired:

A customer replies to an email thread using e.g. gmail. The email history is being added at the end, automatically adding an email reply separator such as: "On xx.xx.xxxx xx:xx ABC wrote:"

The inbound email from the customer is being processed and a record in sys_email created, showing the full email body (including everything written after  "On xx.xx.xxxx xx:xx ABC wrote:". In the Activity Stream of the related task, the email is shown with the latest reply + a "Show full conversation" link. 

When clicking on this link, I can see  "On xx.xx.xxxx xx:xx ABC wrote:"with alle communication written after. 

 

-> For incoming emails related to Cases, email text is being truncated whenever an email reply separator matches. So only the latest reply is shown:

A customer replies to an email thread using e.g. gmail. The email history is being added at the end, automatically adding an email reply separator such as: "On xx.xx.xxxx xx:xx ABC wrote:"

The inbound email from the customer is being processed and a record in sys_email created, showing only the latest reply. Nothing shown starting from where  "On xx.xx.xxxx xx:xx ABC wrote:" would have started.

 

We already checked the following: 

-> inbound email actions for cases and tasks both use "email.body_html" . No difference in the action itself

-> the email text is already being truncated in the record created in sys_email. So the truncation happens before any inbound action ran.

-> when checking the same email in the Sender's email account (e.g. gmail) the full email body has been sent. So truncation must happen within ServiceNow's email processing. 

-> the cutoff always matches the email reply separator. So this is the definition where to run the truncation.

-> there are no table specific email reply seprators. All created ones are for Global scopes in general. And therefore apply for both cases and tasks.

-> we use the same record page for both cases and tasks. So no explanable difference in configurations there. 

 

So my questions are:

Why would the same inbound email be parsed / handled differently for cases vs. tasks?

What could be the reason that email text is being truncated for cases, while not for tasks?

Which Script Includes / Flows & Flow Actions are defining how inbound emails are being processed for cases vs. for tasks? 

What could be the root cause and how can I change the pasing behavior for cases, so it matches the one for tasks and I can use the "Show full conversation" feature designed by ServiceNow? 

 

Thanks in advance for your help. 

 

Best regards

 

 

2 REPLIES 2

Vikram Reddy
Tera Guru

Hi Viviane,

 

I have seen a similar issue in a CSM implementation, and I would not start by changing the inbound email action yet.

 

The key clue is this:

The sys_email record for Case already contains only the latest reply.

That means the truncation is happening before your inbound action logic uses email.body_html. So even if the Case and Task inbound actions both reference email.body_html, the Case path is already receiving a different/processed email body.

In the normal desired behavior, ServiceNow should keep the full inbound email body on sys_email and use the reply separator only to collapse the old thread in the Activity Stream. That is what allows the “Show full conversation” link to work.

If the Case sys_email body itself is physically truncated at the reply separator, then the full conversation is already lost for that email record, so the Activity Stream cannot show it later.

 

What I would check:

1. Compare the exact sys_email records

For one Case email and one Task email, compare these fields directly from the sys_email table:

- target_table
- instance
- type
- subject
- body
- body_text
- body_html
- headers
- mailbox
- user_id
- uid
- content_type

Make sure you are checking the actual field values, not only the Activity Stream display.

If body_html/body_text are both truncated only for Case, then this is not an Activity Stream configuration issue.

 

2. Check whether Case uses a different inbound processing path

In CSM, Case email handling often has additional scoped logic compared to a normal task update. Even if the visible inbound action looks similar, Case processing may involve CSM-specific inbound email actions, flows, subflows, or script includes.

Check these areas:

System Policy > Email > Inbound Actions

Filter for:
- Table = sn_customerservice_case
- Table = sn_customerservice_task
- Active = true

Compare:
- Execution order
- Stop processing
- Conditions
- Advanced script
- Any action that updates sys_email or parses email body

Also check Flow Designer:

Flow Designer > Flows / Subflows

Search for:
- case
- inbound email
- email
- customer service
- reply
- conversation

Look especially for flows/subflows/actions that trigger from inbound email or update Case comments/work notes.

 

3. Check for Business Rules or Flows on sys_email

Because the sys_email record itself is already changed, I would also check whether there is a Business Rule or Flow running on sys_email.

Check Business Rules where:

Table = Email [sys_email]

Search script text for:

- body_html
- body_text
- body
- reply separator
- separator
- sn_customerservice_case
- sn_customerservice_task
- email.body

Also check Flows with trigger table sys_email.

A custom or scoped rule that says “if target_table is sn_customerservice_case, strip quoted text” would explain exactly this behavior.

 

4. Check whether the Case email is being processed by CSM email/thread logic

The target record is usually identified from watermark, reply headers, or correlation. Once ServiceNow knows the email belongs to a Case, CSM-specific processing can be invoked.

That is why the same email text can behave differently for Case vs Task even though the reply separators are global.

The global separator only defines where the previous conversation starts. What happens with that parsed text depends on the processing path.

 

5. Test with the same email body against both records

A good isolation test is:

- Send the same email body to update a Case.
- Send the same email body to update a Task.
- Before looking at the activity stream, open both sys_email records.
- Compare body_html and body_text.

If Task stores full content and Case stores only the latest reply, then you have confirmed a Case-specific preprocessing issue.

 

6. Expected behavior

For your desired behavior, the correct pattern should be:

- sys_email stores the full inbound email body.
- Activity Stream displays only the latest reply.
- Reply separator collapses the old thread.
- “Show full conversation” expands the hidden original thread.

So I would consider the Case behavior incorrect or at least different from the expected pattern.

 

7. Likely root cause

Based on what you described, the most likely causes are:

- A CSM-specific inbound email flow/action is parsing and replacing the body for Case emails.
- A Business Rule/Flow on sys_email is trimming emails when target_table = sn_customerservice_case.
- A custom Case email processor/script include is using the reply separator to permanently strip the quoted conversation.
- A post-upgrade behavior/defect in CSM email processing is applying reply separator cleanup too early for Cases.

 

8. How I would fix it

I would not remove the global reply separators, because they are working correctly for Task and are needed for the Show full conversation behavior.

Instead:

- Identify the Case-specific logic that is modifying/truncating sys_email.
- Change that logic so it does not overwrite sys_email.body_html/body_text.
- Use the parsed latest reply only when writing to Case comments/work notes.
- Keep the original full email body in sys_email.

In other words:

Use trimmed/latest reply for Case activity display.
Keep full email body on sys_email for conversation expansion.

 

9. If no customization is found

If there is no custom sys_email Business Rule, no custom inbound flow, and no custom Case email processor, then I would raise a ServiceNow Support case.

The evidence to provide would be:

- Same inbound email format
- Case sys_email body truncated
- Task sys_email body full
- Same global email reply separators
- Same record page/activity formatter
- Truncation happens before inbound action
- Issue occurs only for sn_customerservice_case

 

I would focus on the Case-specific email processing path, not the separator definition itself. The separator is only the marker. The problem is that the Case path appears to be using that marker to permanently trim sys_email instead of only collapsing the older conversation in the Activity Stream.

 

Thank you,

Vikram Karety

Octigo Solutions INC

@Vikram ReddyThanks for your detailed explanations, insights and tips. We will carefully review the points you mentioned 😀👍