***

title: addAction
slug: /reference/typescript/agents/function-result/add-action
description: Append a raw action to the FunctionResult action list.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

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

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

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

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

Append a raw action to the action list. Prefer the named convenience methods
([`connect()`][connect],
[`hangup()`][hangup],
[`say()`][say], etc.)
for common operations.

## **Parameters**

<ParamField path="name" type="string" required={true} toc={true}>
  Action type identifier (e.g., `"hold"`, `"hangup"`, `"set_global_data"`).
</ParamField>

<ParamField path="data" type="unknown" required={true} toc={true}>
  Action payload. Can be a string, boolean, object, or array depending on the action type.
</ParamField>

## **Returns**

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

## **Example**

```typescript {4}
import { FunctionResult } from '@signalwire/sdk';

const result = new FunctionResult('Processing your request.')
  .addAction('set_global_data', { status: 'active' })
  .addAction('hold', 60);
```