Customer has UCCX Standard 11.0 deployed, the script which I have written makes use of one call variable which consists of a string which is set by the "Set enterprise call info" step, depending upon the dialled number, and is displayed on the agent phone (Agent 1). This is working fine until Agent 1 transfers the call to another CCX trigger (which triggers the same script). When the call is presented to an agent (Agent 2) for the different CSQ, the updated call variable value displays correctly on Agent 2's phone until the point when the transfer is completed by Agent 1, at which point the display on Agent 2's phone changes to the original call variable value set when the initial call was received by agent 1.
I am not an expert at scripts by any means , but I do some similar overall call routing : first CSQ gets call and Agent (1) takes calls ,does some triage, then transfers the call to another trigger to route the call to another CSQ. And we also use the same script to queue the caller to any of our CSQs.
The difference is we use a script in the middle for this transaction so that we can set some information then use call subflow in that 'middle script' to get it to then move to the queue script with the new information we want it to recognize or set.
For us: Agent (1) dials the trigger and call goes to a TransferToCSQ script, I use the "Get Call contact info" step to get Trigger number dialed, Properties = Attributes field (lists attributes created - click on the attribute and click on set (you need to configure the attribute first and in my case it is a String).
You may only need a "set" step after the Get Call Contact info step, identifying what you are setting - example = Set Language = "English" - in the attributes you would add Language as a String.
I actually do that SET step and a "Switch" step - in the Properties -set called number (for us it is the CSQ name I want it to queue to in the next script (queueing script). BUT you may not need this - I have about 25 queues so once it goes to my queueing script I can identify it.)
Then use a "Call Subflow" step , enter the queueing script name and here is where you tell it to transfer the information you 'set' to the queueing script - in the properties set your Input Mappings: Source field is what you Set in this script; Subflow Destination field is the variable in your queue script that you want to set so that it is the new information.
This is all in general of how this is done for us using the same queueing script for the initial call and the agent transferring the caller to queue to another CSQ.
Not sure if this works for you , but may spark some ideas on your part.