---
schema_version: "1"
id: a58988914c33fd0edd6a6372fc2ad27f03bb34ef316fb13fe0dcb1513f149b9e
title: Add Support for After Conversation Work
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/messaging-byoc-ccaas/guides/after-conversation-work.md
canonical_url: https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/after-conversation-work.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 51a000bf77f2d61aabbb9199ea4d96ef50f27335d76b27cdbe03e876315484e8
products:
  - Bring Your Own Channel for CCaaS
  - Service Cloud Developer Content
---
# Add Support for After Conversation Work

After Conversation Work (ACW) gives reps a set amount of time after a customer conversation to wrap up their work before making themselves available for new work to be received.
Follow these steps to support the After Conversation Work feature for Bring Your Own Channel for CCaaS.

1. To trigger After Conversation Work for a rep’s AgentWork, call the Interaction Service [Remove a Participant](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-participant.html) API (`POST /api/v1/participant`).

2. If the rep wraps up their work before the After Conversation Work period runs out, end the work from your integration by calling the Interaction Service [Update or Close an AgentWork Record](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-agentWork-patch.html) API (`PATCH /api/v1/agentWork`) with `status` set to **Close** and `contextType` set to **Agent**. That closes the AgentWork record from your server and aligns with capacity and messaging session behavior for After Conversation Work.

3. If the rep is working in the Salesforce console and finishes early, they can select **All Done** or close the record tab to show they’re ready to help the next customer. In that case, use the `closeAgentWork()` method of the Lightning Console JavaScript API (omniToolkitAPI) to change the work item status to Closed and remove it from the list of work items in the Omni-Channel utility.

4. Otherwise, After Conversation Work times out based on the **Max Time** in seconds specified by the Salesforce admin.

**note:** Use the Interaction Service Remove a Participant API and Update or Close an AgentWork Record API for messaging sessions only. To control After Conversation Work for Voice, see [_Salesforce Voice with Partner Telephony Developer Guide_: After Conversation Work](https://developer.salesforce.com/docs/atlas.en-us.voice_pt_developer_guide.meta/voice_pt_developer_guide/voice_pt_after_conversation_work.htm).

**See Also**

- _Interaction Service API_: [Remove a Participant](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-participant.html)
- _Interaction Service API_: [Update or Close an AgentWork Record](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-agentWork-patch.html)
- _Salesforce Console Developer Guide_: [closeAgentWork for Lightning Experience](https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_lightning_closeagentwork.htm)
- _Omni-Channel Developer Guide_: [Methods for Omni-Channel in Lightning Experience](https://developer.salesforce.com/docs/atlas.en-us.omni_channel_dev.meta/omni_channel_dev/service_presence_console_api_lightning_methods.htm)
- _Salesforce Help_: [Configure After Conversation Work Time](https://help.salesforce.com/s/articleView?id=service.omnichannel_configure_after_conversation_work_time.htm)
