Skip to main content


Copilot Studio - General

LinkToConversation (PVA with Omnichannel)

Posted on by 21

We do not use the automatic identification function to search for contact. Because we do not use the standard fields and our search is specific.

Our chatbot asks the customer for information such as first name, last name, email address, zip code, date of birth, etc.. The PVA calls a power automate which searches for the contact and sets the fields msdyn_customer and RegardingObjectId on the conversation filled with the found contact.

We then noticed that the contact is not yet linked on the Omichannel Agent form. I then found out that populating the fields is not enough, that you have to call the API "linkToConversation".
Is this the right way to do it? Or is there another way?


Description according to Microsoft:


I added the javascript function to the form load, exactly the same as in the code example from Microsoft, you have to do a refresh afterwards so that it is also visible.

example from Microsoft:
//Linking an incident record with the current conversation
Microsoft.Omnichannel.linkToConversation("incident", "6b726d86-d37c-43b8-b3a4-c4056ddd2e07").then((response) => {
// Refreshing the tab UI
}, (error) => {


Only this has the consequence that the refresh triggers the form load again and the linking happens a few times. How would you solve this?




The Power Automate also sets other custom fields on the entity conversation. If the conversation is loaded for the agent, the fields on the form are always empty. If I search for the conversation via Advanced Search and open the form, they are filled. Why is this not displayed in the agent form?



Thank you very much.

  • maiconcesarvaz Profile Picture
    maiconcesarvaz 2 on at
    LinkToConversation (PVA with Omnichannel)
    Hi @canubis.

    How did you solve this problem?

    We need to do the same here. We tried to remove linkToConversation in use today by JS, and move to power automate, but without success.

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…


WarrenBelz Profile Picture

WarrenBelz 137,998

RandyHayes Profile Picture

RandyHayes 76,308

Pstork1 Profile Picture

Pstork1 63,059