In this Blog Post, I have used Pre-Chat fields in the Messaging for In-App and web to capture First Name, Last Name and Email of the visitor. Using Omni-Channel Flow, I have checked the existing Contact. If there is no matching contact found using the Email, then a new Contact record is created in the Omni-Channel Flow. Please check the following Blog Post for reference.
For Agent Action, I am using Autolaunched Flow in Salesforce for Agentforce.
contactRecord Input Variable:
bookingNumber Input Variable:
opportunityRecord Output Variable:
Fetch Opportunity Configuration:
Topic Configuration:
Use Update Included Fields button to include additional fields in the Context Variable. In this demo, I have included Contact ID.
Agent Action Configuration:
Output: