> This page is for Server SDKs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# rpcAiGlobalData

> Merge data into another call's global data without adding a conversation turn.

[functionresult]: /docs/server-sdks/reference/typescript/agents/function-result

[rpcaimessage]: /docs/server-sdks/reference/typescript/agents/function-result/rpc-ai-message

Merge data into another call's global data without injecting a conversation turn.
A thin wrapper over [`rpcAiMessage()`][rpcaimessage] with only `globalData` set.
Use it when the other call needs a value rather than an instruction; that call's
prompt reads it back with `${global_data.key}`.

## Parameters

**`callId`** `string` — required

Call ID of the target call.

---

**`data`** `Record<string, unknown>` — required

Object merged into that call's global data.

---

## Returns

[`FunctionResult`][functionresult] -- `this`, for chaining.

## Example

```typescript {20-21}
import { AgentBase, FunctionResult } from '@signalwire/sdk';

const agent = new AgentBase({ name: 'dispatch', route: '/dispatch' });
agent.setPromptText('You are Ada, the dispatcher for Bayview Taxi.');

agent.defineTool({
  name: 'share_eta',
  description: 'Send the ETA to the waiting caller',
  parameters: {
    type: 'object',
    properties: {
      waiting_call_id: { type: 'string', description: 'Call ID of the waiting caller' },
      eta_minutes: { type: 'integer', description: 'Minutes until pickup' },
    },
    required: ['waiting_call_id', 'eta_minutes'],
  },
  handler: (args) => {
    const waitingCallId = String(args.waiting_call_id);
    return new FunctionResult('Tell the driver the passenger has been updated.')
      .rpcAiGlobalData(waitingCallId, { eta_minutes: args.eta_minutes })
      .rpcAiUnhold(waitingCallId);
  },
});

await agent.serve();
```