Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Seb Reeve on October 12, 2007, 03:12:33 PM

Title: Attaching INTEGER Userdata using URS
Post by: Seb Reeve on October 12, 2007, 03:12:33 PM

I have an annoying conundrum - I need to attach KVPs to a call as an INTEGER type - i.e.:

request to 65203(--) message RequestAttachUserData
AttributeReferenceID 209
AttributeUserData [25] 00 01 00 00..
'Genesys_Call_Ref' [b][color=red]19[/color][/b]
AttributeConnID 00a4018091304009
AttributeThisDN '2001'

NOT:

request to 65203(--) message RequestAttachUserData
AttributeReferenceID 209
AttributeUserData [25] 00 01 00 00..
'Genesys_Call_Ref' [b][color=red]'19'[/color][/b]
AttributeConnID 00a4018091304009
AttributeThisDN '2001'

I have tried Attach, MultiAttach blocks in IRD
I have tried Attach[] function
I have tried SendRequest[RequestUpdateUserData,...] function

...but all these methods attach the value as a String (i.e. in single quotation marks in the log)

Any ideas to spare me from this madness?!

Thanks!
Title: Re: Attaching INTEGER Userdata using URS
Post by: Adam G. on October 12, 2007, 03:29:34 PM
I haven't tried this out, but......

Create a variable of type integer, store the value in the variable then attach the variable as UData.

If it works can you let us know?

Cheers,

Pavel


Title: Re: Attaching INTEGER Userdata using URS
Post by: Seb Reeve on October 12, 2007, 03:45:39 PM
Thanks for the suggestion Pavel,

Unfortunately i have already tried this one too!

Seems the attach blocks and functions take a String parameter and so implicitly convert my integer to a string before sending the event.

Seb
Title: Re: Attaching INTEGER Userdata using URS
Post by: ChrisKo on October 12, 2007, 05:02:55 PM
New to the board and to Genesys, but could you just CInt(stringvalue) on the other side of the route? Or do you not have any code involved on the other side?

ChrisKo

ps, guess I should register on the board sometime this weekend if I'm going to participate.  >:D
Title: Re: Attaching INTEGER Userdata using URS
Post by: Sylvainsjc on October 12, 2007, 05:26:32 PM
You can't do this with "attach" fonction in IRD. The best way is to convert the string value on the application side.
Sylvain
Title: Re: Attaching INTEGER Userdata using URS
Post by: Adam G. on October 15, 2007, 07:55:15 AM
This has been bugging me over the weekend....

The answer lies in using the function  [b]UDataINT[/b]

Title: Re: Attaching INTEGER Userdata using URS
Post by: Seb Reeve on October 15, 2007, 08:18:52 AM
Hey Pavel,

Thanks for not letting go of this! It's really annoying that something as functional as URS cannot attach an Integer KVP (when this is part of the TLib spec)

I looked at UDataINT but it looks like this just retrieves a KVP and converts it to Int for use in a strategy - it doesn't allow me to Attach/Update a KVP of an Int type.

Thanks!

Seb
Title: Re: Attaching INTEGER Userdata using URS
Post by: mark on October 15, 2007, 08:20:20 AM
[quote author=Seb Reeve link=topic=2514.msg9655#msg9655 date=1192436332]
Hey Pavel,

Thanks for not letting go of this! It's really annoying that something as functional as URS cannot attach an Integer KVP (when this is part of the TLib spec)

I looked at UDataINT but it looks like this just retrieves a KVP and converts it to Int for use in a strategy - it doesn't allow me to Attach/Update a KVP of an Int type.

Thanks!

Seb
[/quote]

If that is the case, can you not attach it with the normal UData, then convert it to INT via UDataINT?

Mark
Title: Re: Attaching INTEGER Userdata using URS
Post by: Seb Reeve on October 15, 2007, 08:22:51 AM
No - I need the actual attached data in TServer to be an INT.

Every method of attach from URS attaches strings...

  AttributeUserData  [25] 00 01 00 00..
      'Genesys_Call_Ref'  '19'

(the quotes around the value "19" denote a string type...

But I want:

  AttributeUserData  [25] 00 01 00 00..
      'Genesys_Call_Ref'  19

which is stored in TServer as an INTeger...

Thanks...
Title: Re: Attaching INTEGER Userdata using URS
Post by: cavagnaro on October 15, 2007, 01:39:48 PM
Well as it seems a URS limitation open a eSR to Genesys directly and let us know what they told. I have tried too and yes, only attachs as String...weird.
Title: Re: Attaching INTEGER Userdata using URS
Post by: cavagnaro on November 06, 2007, 01:46:15 AM
Hey Seb, had any news from this?
Title: Re: Attaching INTEGER Userdata using URS
Post by: René on November 06, 2007, 09:29:35 PM
Hi Seb,

Unfortunately URS doesn't support non-string values for UserData key. The description of URS function Attach/Update is clear:

[code]
function "Attach" / "Update"
  Parameters:
    Key: STRING
    Value: STRING
[/code]

I'm pretty sure that TechSupport will suggest you to open a Feature Request...

René
Title: Re: Attaching INTEGER Userdata using URS
Post by: victor on November 11, 2007, 11:21:21 PM
I wonder, just wonder, if it can be done using UserData. I know that manual says that it is String, but I wonder if there is a way to add directly to UserData bypassing the usual Update.

I remember a while back I needed to attach several keys at once, and it was before Multi-Attach in 7.2, and after awhile (and thanks to feedback from Tony, Pavel and handful of other people) the answer was adding a KV pairs into a string and then passing a string into Update function. I wonder if you could go around the string requirement by adding keys and integer values into one long string ariable and then passing it to Update.

Title: Re: Attaching INTEGER Userdata using URS
Post by: cavagnaro on November 11, 2007, 11:52:03 PM
ok guys, taking this on my hands I asked Genesys guys to try it and they said ups...and yes, they are asking me to open a feature request, the funny part, they want me to tell them if I need an INTEGER or a FLOAT...
What do you think...I can ask both, however if only one can be done I'll ask for the Float, do you agree?
Title: Re: Attaching INTEGER Userdata using URS
Post by: victor on November 12, 2007, 05:50:32 AM
Ok, I tried my Update["",key1:value1|key2:value2] method, but it still added it as strings.
Come to think of it, why would you want INT ?
Title: Re: Attaching INTEGER Userdata using URS
Post by: jbobinsk on November 14, 2007, 11:47:06 AM
I think that you can try to create InteractionData type int and then input value in it so it should work (I never tested it but looks logically).

Regards

JB
Title: Re: Attaching INTEGER Userdata using URS
Post by: cavagnaro on November 14, 2007, 03:04:51 PM
No, doesn't work, tested already
Title: Re: Attaching INTEGER Userdata using URS
Post by: jbobinsk on November 14, 2007, 03:54:43 PM
It should I'm sure - because a two years before I did it this way. You have to only assign Interaction data not directly key of interaction data.
But I'll check it and let you know.
Title: Re: Attaching INTEGER Userdata using URS
Post by: jbobinsk on November 14, 2007, 04:50:21 PM
Sorry for confusing you.
I have just checked - and I was wrong, actually I don't see the way in which there is possible to attach/update integer value to the UserData directly from strategy.
I have done it before but not by URS.
Title: Re: Attaching INTEGER Userdata using URS
Post by: cavagnaro on December 12, 2007, 07:26:15 PM
Ok guys, I received a solution from Genesys do this:

In my test strategy I created an Integer variable called var_Age.  I assigned my variable a value of 32.  I did not put quotes around the 32 in my assignment block.

Then in my Update function I used the {d} in the Key Field and selected my Variable as the Value.  My Update function was as follows.  NOTE that the entire Prefix and Key are enclosed in Single quotes:

Update['{d}MyAge',var_Age]

URS then did the udpate as follows:

    _I_I_00650184e3e08001 [09:04] ASSIGN: var_Age(LOCAL) <- INTEGER: 32
request to 65220(TServerG3) message RequestUpdateUserData
        AttributeReferenceID    15
        AttributeUserData      [16] 00 01 01 00..
                'MyAge' 32
        AttributeConnID 00650184e3e08001
        AttributeThisDN '5040'

Works for me (URS 7.2)

Can you try and post comments?

Regards
Title: Re: Attaching INTEGER Userdata using URS
Post by: Daimonas on December 12, 2007, 10:03:12 PM
The Genesys solution sounds like the best, I remember I ran into this issue a couple years back and I ended up using Routers function SendRequest with a type of "RequestUpdateUserData" and then spesfiy all the parmameters in the Request field.  This works the same as a soft-phone updating user-data.

Title: Re: Attaching INTEGER Userdata using URS
Post by: victor on December 14, 2007, 09:47:32 AM
Can you post a sample strategy?

Also, what are some of the other things you can send with SendRequest?
Title: Re: Attaching INTEGER Userdata using URS
Post by: Daimonas on December 14, 2007, 01:57:55 PM
Yeah, I will have to find one where I did it but you can pretty much do anything with it, SendEvent works too.
Title: Re: Attaching INTEGER Userdata using URS
Post by: Seb Reeve on December 14, 2007, 04:35:23 PM
cavagnaro - you are a genius!! Thanks - another undocumented Genesys feature...

Are there any other prefixes we should know about?! Can you use {f} for float?! or {b} for binary??

Seb
Title: Re: Attaching INTEGER Userdata using URS
Post by: cavagnaro on December 14, 2007, 05:06:50 PM
lol I'm not a genius, I only persevered bothering Genesys people who insisted on it was not doable and called here and there and ups! You can do it! Who would ever know...
Would ask if there are other options.

Regards