How can I capture the Omni-Channel 'Transfer' event? We need to do some custom post-processing or pre-processing when a Lead is transferred to another agent.
To capture the Transfer event, you have to write trigger on AgetWork and you have to check for status field. Status field value change in following ways.
If a work item is assigned to agent and it is in new item then status field will be Assigned. If a work item is accepted by agent and then status will be opened. If a work item is transferred by agent and then agent work status will be transfer.
Please go through the below link for more information on agent work object. [https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_agentwork.htm]