Niharika,
If you're just trying to set it as attached data and not necessarily use it directly, why don't you try something like this:
context.setAttachedCallData("ANI",context.getCLI());
That should save you a step of defining an internal script variable if you're not going to manipulate the data.
If you absolutely cannot move away from this model, may I suggest the following:
def sCLI=context.getCLI();
// Log output to determine if the variable is null and that's why it's not setting appropriately
context.log(sCLI);
context.setAttachedCallData("ANI",sCLI);
Since it's locally defined, I don't believe it's accessible under the context reference.
This may help as well:
https://docs.genesys.com/images/Repo/GIA901_ScriptAPI.zipThank you.
------------------------------
Ivan Ullmann
Eventus Solutions Group
------------------------------
Original Message:
Sent: 02-01-2019 16:13
From: Niharika Chennamadhav
Subject: GIA Callfloweditor Script
HI, I was trying to retrieve the ANI for a call using getCLI(), for some reason, I am getting a null value. This is what I am doing
def sCLI=context.getCLI();
context.setAttachedCallData("ANI",context.getVariable("sCLI"));
#Self-Service
------------------------------
Niharika Chennamadhav
------------------------------