Attaching INTEGER Userdata using URS

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’ 19
AttributeConnID 00a4018091304009
AttributeThisDN ‘2001’

NOT:

request to 65203(–) message RequestAttachUserData
AttributeReferenceID 209
AttributeUserData [25] 00 01 00 00..
‘Genesys_Call_Ref’ ‘19’
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!

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,

Wyn

Thanks for the suggestion Wyn,

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

2 Likes

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. >:smiley:

You can’t do this with “attach” fonction in IRD. The best way is to convert the string value on the application side.
Sylvain

1 Like

This has been bugging me over the weekend…

The answer lies in using the function UDataINT

Hey Wyn,

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

1 Like

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

Mark

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…

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.

Hey Seb, had any news from this?

Hi Seb,

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


function "Attach" / "Update"
  Parameters:
    Key: STRING
    Value: STRING

I’m pretty sure that TechSupport will suggest you to open a Feature Request…

René

1 Like

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, wyn 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.

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?

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 ?

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

No, doesn’t work, tested already

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.

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.

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