" /> Attaching INTEGER Userdata using URS - Genesys CTI User Forum

Author Topic: Attaching INTEGER Userdata using URS  (Read 15852 times)

Offline Seb Reeve

  • Jr. Member
  • **
  • Posts: 62
  • Karma: 0
    • Sabio Limited
Attaching INTEGER Userdata using URS
« on: October 12, 2007, 03:12:33 PM »
Advertisement

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!

Offline Adam G.

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 12
  • Still Gorgeous.......
Re: Attaching INTEGER Userdata using URS
« Reply #1 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



Offline Seb Reeve

  • Jr. Member
  • **
  • Posts: 62
  • Karma: 0
    • Sabio Limited
Re: Attaching INTEGER Userdata using URS
« Reply #2 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

ChrisKo

  • Guest
Re: Attaching INTEGER Userdata using URS
« Reply #3 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

Offline Sylvainsjc

  • Full Member
  • ***
  • Posts: 137
  • Karma: 2
Re: Attaching INTEGER Userdata using URS
« Reply #4 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

Offline Adam G.

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 12
  • Still Gorgeous.......
Re: Attaching INTEGER Userdata using URS
« Reply #5 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]


Offline Seb Reeve

  • Jr. Member
  • **
  • Posts: 62
  • Karma: 0
    • Sabio Limited
Re: Attaching INTEGER Userdata using URS
« Reply #6 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

Offline mark

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: 2
Re: Attaching INTEGER Userdata using URS
« Reply #7 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

Offline Seb Reeve

  • Jr. Member
  • **
  • Posts: 62
  • Karma: 0
    • Sabio Limited
Re: Attaching INTEGER Userdata using URS
« Reply #8 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...

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Attaching INTEGER Userdata using URS
« Reply #9 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.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Attaching INTEGER Userdata using URS
« Reply #10 on: November 06, 2007, 01:46:15 AM »
Hey Seb, had any news from this?

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Attaching INTEGER Userdata using URS
« Reply #11 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é

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1419
  • Karma: 18
Re: Attaching INTEGER Userdata using URS
« Reply #12 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.


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Attaching INTEGER Userdata using URS
« Reply #13 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?

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1419
  • Karma: 18
Re: Attaching INTEGER Userdata using URS
« Reply #14 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 ?