How do you get interaction user data? WDE customization

Hello,

I am trying to find the method to get a userdata key value from the interaction so it can be used to start a browser.
this is what I tried so far.
At the event ringing , WDE extracts the value of key (‘URL_Field’) and starts a browser ('http://www.genesys.com).
I have added a messagebox to confirm the value is extracted but that brings a blank response when call lands in WDE.
Tried a few other code snippets without success so not sure whether I am using an invalid method.
essentially I just want to take the key value and use it to start a browser in a new window.

[i][b]//……
case EventRinging.MessageId:
// Do your processing here
var Url = string.Empty;

                    KeyValueCollection attachedData = interaction.AttachedDataInformation;
                    if (attachedData.ContainsKey("URL_Field"))
                        Url = attachedData["URL_Field"].ToString();

                    IWMessageBoxView.Show("Interaction Created: " + Url, IWMessageBoxButtons.Ok, MessageBoxIcon.Information);

                    System.Diagnostics.Process.Start(Url);

//…..[/b][/i]

thanks

Try this:


            if (interaction.GetAllAttachedData().ContainsKey("URL_Field"))
            {
                return interaction.GetAllAttachedData()["URL_Field"] as string;
            }

GetAllAttachedData() is definitely the way to go

thank you , worked like a treat.
This is the full portion of the code I used in the end after the EventRinging..

[i][b]//……
{
case EventRinging.MessageId:
// Do your processing here
var Url = string.Empty;

                    KeyValueCollection attachedData = interaction.AttachedDataInformation;
                    if (interaction.GetAllAttachedData().ContainsKey("URL_Field"))
                    Url = interaction.GetAllAttachedData()["URL_Field"] as string;

                    IWMessageBoxView.Show("Interaction Created: " + Url, IWMessageBoxButtons.Ok, MessageBoxIcon.Information);

                    System.Diagnostics.Process.Start(Url);

                    break; 

//….[/b][/i]