{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":7224,"path":"customer-service-management/send-case-email-replies-interaction-emails-activity-history.md","title":"Send case email replies with interaction email history","bundle":null,"doc_type":null,"release":"australia","body":"\n# Send case email replies with interaction email history\n\nInclude emails from related interactions in agent case email responses to provide full context of prior email communications. You can create history by embedding an email script within an email client template.\n\n## Before you begin\n\nRole required: admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Email Client** &gt; **Email Client Templates**.\n\n2.  Search and select **reply-for-customer-service**.\n\n    **Note:** If a message appears about the application scope, select **here** to be able to edit the record.\n\n3.  On the Content tab, in the  **Body HTML ** field, enter `<div id=\"collapsible-content\">${mail_script:get_activity_of_case_and_related_interaction_for_email}</div>`.\n\n    **Note:**\n\n    -   The number of emails in the activity history matches the value set in the system properties, **include\\_system\\_emails\\_in\\_notification and number\\_of\\_activities\\_in\\_reply**.\n    -   You can also create a client template and map it to the Interaction table. For more information, see [Create an email client template](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-administration/t_CreateAnEmailClientTemplate.md).\n4.  Select **Update**.\n\n\n## Result\n\nThe get\\_activity\\_of\\_case\\_and\\_related\\_interaction\\_for\\_email script retrieves and formats cases and related interaction email history, adding it to the email client in the agent workspace. The content is hidden behind ellipses within a DIV tag with the ID “collapsible-content\".\n\n**Related topics**  \n\n\n[Enable agents to respond to customers with email activity history](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/customer-service-management/enable-agent-respond-customer-email-activity-history.md)\n\n"}}