> 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.

# Change

> The change an operation's prepare() builds, with its read-back, what it touches, its writes, the money it moves, and what to say once it's made.

[operation]: /docs/server-sdks/reference/python/agents/operations/operation

[write]: /docs/server-sdks/reference/python/agents/operations/write

[money]: /docs/server-sdks/reference/python/agents/operations/money

`Change` is what an [operation's][operation] `prepare()` returns when the request is
valid and complete. The SDK keeps it as the change waiting for the caller's yes, and the
platform says its `read_back`. `Change` is a dataclass.

```python
from signalwire.operations import Change
```

## Parameters

**`read_back`** `str` — required

The words the platform says and the caller says yes to. Put the change itself in the
first clause: a read-back cut off by the caller's answer is judged on what they heard.
May be empty for an operation with `confirm = False`.

---

**`touches`** `Sequence[str]` — default: ()

Stable keys for everything the change acts on, such as `"order:#W1"` or
`"item:9494281769"`. A new request is compared with the waiting change by these.

---

**`writes`** `Sequence[Write]` — default: ()

The backend [writes][write], run in order once the caller says yes.

---

**`money`** `Sequence[int | float | Decimal | str] | None` — default: None

The money each write moves: more than 0 is charged, less than 0 goes back to the
caller. Amounts are kept exactly. See [money][money].

---

**`currency`** `str | None` — default: None

The ISO 4217 code of `money`, such as `"EUR"`. Defaults to the service's `currency`.

---

**`done`** `Sequence[str] | str | None` — default: None

What to tell the caller once the writes went through: one string for the whole
change, or one per write. Defaults to the `done.default` wording, built from the
read-back.

---

**`after`** `str | None` — default: None

The kind of another change the caller asked for that has to go first. This change
isn't read back yet: it's set aside, the model is told to call that kind's tool, and
it's offered once a change of that kind is settled.

---

**`after_why`** `str`

Why the other change goes first, as a clause.

---

**`then`** `str | None` — default: None

What the model is told once the change is made, in place of the service's own text.
Use it for a change whose effect comes after the tool's result, such as a payment the
platform takes next.

---

## Example

```python
from signalwire.operations import Change, Write

change = Change(
    read_back="Cancel order #W1, refunding $54.04. Shall I go ahead?",
    touches=["order:#W1"],
    writes=[Write("cancel_order", order_id="#W1")],
    money=[-54.04],
    currency="USD",
    done="Order #W1 is cancelled.",
)
```