> For the complete documentation index, see [llms.txt](https://v5docs.keyfax.biz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v5docs.keyfax.biz/scripts/system-actions/run-csharp.md).

# Run C\#

**Badge: `SYS`**

Runs a small piece of C# as a step, for the things a script's own building blocks cannot express: a calculation with several conditions, a lookup that has to be reshaped before it is useful, a value derived from more than one source.

<figure><img src="/files/wZzoXVGteJ7piNPKIFtn" alt="A Run C# system action open in the editor"><figcaption><p>A Run C# step and its settings</p></figcaption></figure>

It shows the caller nothing, and the conversation carries straight on to the next step.

## Written by Omfax

In this release the code behind a Run C# step is written by Omfax and agreed with you like any other change to a script. It is not somewhere to paste code into the Administration Tool.

## What the code can reach

Not the server. The snippet is given one curated context and nothing else: the conversation's own databoxes, and a defined set of reads and writes against your housing data. Anything outside that is simply not available to it.

## Time limit, and failure

A run is given ten seconds. That is a hard limit rather than a target — a step that has not finished is abandoned and the conversation moves on, rather than leaving someone waiting.

**A failure never takes the conversation down.** If the code will not compile, fails, or runs out of time, the step records what happened and the script advances anyway. Every run is recorded in the conversation's history, with whether it succeeded and the log the code produced, so a step that quietly did nothing can still be diagnosed afterwards.

That is deliberate, and worth designing around: **write the script so it still reaches a sensible outcome if the code does nothing at all.** Anything the conversation depends on should be checked afterwards rather than assumed.
