# Coded functions (Preview)

> Deterministic Python or TypeScript/JavaScript business logic, such as data transforms, domain rules, and custom API calls.

A coded function runs deterministic Python or TypeScript/JavaScript on typed input and output, with no LLM. Your coding agent builds, tests, and publishes it with the `uipath-functions` skill (see the [Skills catalog](skills-catalog.md)).

The skill is in Preview. Function projects are generally available in Studio Web.

## When to use a function

Use when no activity covers the logic: custom-auth API calls, business rules, data transforms.

| Language | Built with |
| --- | --- |
| Python | Pydantic `Input`/`Output` models. Runs through `uip function`. UiPath SDK access. |
| TypeScript or JavaScript | `defineFunction` with a typed schema. Exposes an HTTP endpoint or a run-as-job trigger. |

Call a function as a Maestro service task, from a coded agent, as an Orchestrator job, or over HTTP if it has an endpoint.

## Normalize an order payload

> Create a coded function that normalizes this order payload: trims whitespace, uppercases the order ID, and converts the date to ISO 8601.

:::note
- After publishing a new version, update the function's release in Orchestrator (**Automations** > **Processes**). Triggers use the old version until you do.
- HTTP endpoint functions should finish within 20 seconds. The gateway times out at 25 seconds. For longer work, use a run-as-job function.
:::

## Other function requests

- Build a Python function that returns the discounted total from our pricing API.
- Create a TypeScript function with an HTTP endpoint for a coded app's backend.
- Test this function locally with three inputs, including one error case.

More: [Functions documentation](https://docs.uipath.com/functions).
