Changing variableValues mid-call
# support
c
Can variableValues be changed mid-call, e.g. by a tool call? My use case: Squad member 1 talks to caller, gets data, e.g. address Squad member 1 calls tool, which calls PATCH /call/:id to update membersOverrides.variableValues Squad member 1 transfers to Squad member 2 Squad member 2 references the variables Right now this does not work, could you please share the best practice for this?
v
1\. Have Squad Member 1 store the collected information in a structured way before transfer:
Copy code
// Squad Member 1's response before transfer

const response = `I've collected the following information:

- Address: ${collectedAddress}

- Other data: ${otherData}

Transferring you to my colleague who will help further.`;
2\. Configure the transfer with `rolling-history`:
Copy code
const transferTool = {

  type: 'transferCall',

  destinations: [{

    type: 'assistant',

    assistantName: 'Squad Member 2',

    transferMode: 'rolling-history',

    message: '' // Silent transfer

  }]

};
3\. Squad Member 2 can reference the previous conversation to extract the information:
Copy code
// In Squad Member 2's system prompt

const systemPrompt = `

You are Squad Member 2. Review the conversation history to find any collected information.

Look for structured data shared by Squad Member 1 before the transfer.

`;
Why This Works: 1\. The conversation history preservation is built into the transfer system 2\. No need to modify variable values mid-call 3\. Information remains in context naturally 4\. More reliable than trying to update variables during runtime
a
this is great @Shubham Bajaj
s
@choomba a gentle ping to continue this thread.
a
WE can close this thanks for your help!!
2 Views