Connecting Microsoft Copilot to Salesforce Einstein Handoff

33 Views Asked by At

I am looking into integrating Microsoft copilot with Salesforce Einstein. In the Microsoft documentation it has the below. I imagine individuals will probably be googling this like crazy eventually with the rising popularity of Microsoft Copilot.

How best would it be to perform the below?

Step 3: Create Apex Classes to connect to DirectLine API

Log in to your Salesforce account. In Salesforce, navigate to Setup. In the Quick Find box, type Apex Classes. Create three new classes with the following details: DL_GetConversation

Inputs: None Outputs: (String) conversationId, (Integer) responseCode, (String) errorMessage InvocableMethod getConversationID, use your DirectLine Secret to make an HTTP call to the DirectLine endpoint starting a conversation DL_PostActivity

Inputs: (String) conversationId, (String) userMessage Outputs: (Integer) responseCode, (String) errorMessage, (String) watermark InvocableMethod postActivity: Execute an HTTP call to the post activity DirectLine API using the conversationId in the URL and userMessage DL_GetActivity

Inputs: (String) conversationId, (String) watermark Outputs: (String) message, (String) watermark, (Integer) responseCode, (String) errorMessage InvocableMethod getActivity: Execute an HTTP call to the get activity DirectLine API, using the conversationId and watermark to retrieve and parse the activity object for the message to send back to the user

I have tried googling, unfortunately, to no avail, and no one has done a sample code regarding this. It is probably because of how young Microsoft Copilot is.

0

There are 0 best solutions below