Automatically comment when closing live chat (Portal URL included) - JMWE for Cloud
When a live chat request (via Chat for JSM) is closed, a custom comment should be automatically added to the request to notify the customer. The comment includes a message confirming the request has been resolved and provides a link to the full ticket details in the support portal.
This can be implemented using the JMWE Comment issue(s) post-function on the resolution transition of your Jira Service Management project.
Prerequisites
Make sure the following are in place:
You are using Jira Cloud.
Both Chat for JSM and JMWE for Jira Cloud apps are installed.
You have a Jira Service Management project with a live chat workflow.
You have a transition that moves chat requests to a resolved state (for example, from "In Progress" or "Waiting for Support" to "Done" or "Resolved").
Configuration steps
Edit the target workflow:
Navigate to the Jira project settings.
Open the workflow associated with the work type (for example, "Chat Request").
Select the transition that marks the request as "Done" (e.g., "Resolve this issue").
Add the Comment Issue(s) post-function:
Click Post Functions and select Add post function.
Choose Comment issue(s) from JMWE.
In the Comment text section, enter the following Nunjucks template:
Dear partner, We're glad to inform you that the issue reported in this chat has been successfully resolved. You can view the full details in the support ticket here: https://your-support-site.atlassian.net/servicedesk/customer/portal/2/{{ issue.key }} If you need further assistance or encounter a new issue, please don’t hesitate to open a new ticket. We're always here to help.👉 Replace the URL prefix with your actual Service Desk portal link (this example uses
portal/2).
Configure the scope and options:
Ensure the comment is added to the current issue.
Set the post-function to run as the current user (or app user if appropriate).
Optionally restrict execution using a condition if needed.
Save and publish the workflow.
Result
Once the ticket is resolved, JMWE automatically adds a comment that includes the ticket link, as illustrated in the chat conversation below.