﻿# Functions Framework

The Functions Framework provides a flexible way to customize application behavior and automate workflows. It consists of four core building blocks.

The framework configuration is defined in JSON and validated against a [JSON Schema](https://schemas.acrobits.net/core/functions/input.json). You can validate your configuration using the [Acrobits Schema Validator](https://schemas.acrobits.net/validator/#/core/functions/input.json).

## Functions

[Functions](function-reference.md) are actions executed automatically or manually in response to specific events. Examples include navigating the user within the app, opening a web page, making HTTP requests, logging data, or sending DTMF sequences during a call. Functions can be chained, delayed, or run in parallel to create sophisticated interactions.

## Conditions

[Conditions](conditions.md) determine whether a function or UI component (such as a [Button](buttons.md)) should execute or become visible. Conditions evaluate criteria such as call state, user settings, account properties, or call metadata. They can be combined using logical operators (`AND`, `OR`, `NOT`) to express complex rules.

## Triggers

[Triggers](triggers.md) are observable events that automatically initiate functions — for example, call state transitions (incoming ringing, established call) or provisioning events. Triggers automate behavior by starting functions at precisely defined moments.

## Buttons

[Buttons](buttons.md) are configurable UI components displayed on the call screen or keypad based on conditions. When pressed, buttons invoke associated functions.

## Additional Topics

- [Scopes and Placeholders](scopes.md) — Variable scoping, memory banks, and placeholder resolution.
- [Smart Links](smart-links.md) — URL-based mechanism to trigger functions and actions from outside the app.