> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudify.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# How It Works

<Info>
  This page walks through what actually happens during a Fourgent session — agent by agent. New here? Start with the [Introduction](/introduction).
</Info>

## You type. Four agents take it from there.

When you describe an integration in Fourgent — something like *"When a deal closes in HubSpot, send a message to #sales in Slack"* — you're not filling out a form or configuring a template. You're starting a conversation that hands off through four specialized agents, each responsible for a specific part of getting your integration live.

<Frame>
  <img src="https://mintcdn.com/cloudify-c7720744/_o7EywSvu_olPyXU/images/fourgent_journey.png?fit=max&auto=format&n=_o7EywSvu_olPyXU&q=85&s=58b112a7c0ef46e737e103ca6e75f1e7" alt="Fourgent Journey" width="1920" height="1080" data-path="images/fourgent_journey.png" />
</Frame>

You can watch every step happen in real time: in the chat on the left, and across four panels on the right — **Progress**, **Files**, **Flow**, and **Mapping**.

***

## Starting a Session

Fourgent needs one thing from you: a clear description of what you want built. You don't need to know which APIs are involved, what the field names are, or how authentication works.

<Tabs>
  <Tab title="Examples">
    > *"When a deal is marked Closed Won in HubSpot, send a Slack message to #sales with the deal name and value."*

    > *"Every hour, sync new customer records from Salesforce into our database."*

    > *"When a Zendesk ticket is marked urgent, create a Jira issue and alert #support-escalations."*
  </Tab>

  <Tab title="What to include">
    * **Both app names** — HubSpot, Slack, QuickBooks, not "my CRM" or "our finance tool"
    * **The exact trigger** — what event starts the integration
    * **Any conditions** — only for Enterprise accounts, skip test orders, etc.
    * **The outcome** — what should happen as a result

    See [Tips for Prompting](/tips-for-prompting) for a full guide.
  </Tab>
</Tabs>

Fourgent asks a focused follow-up question or two if it needs to close a gap. Once it has enough, it hands off. You'll see it in the chat: **HANDOFF TO ONBOARDING SPECIALIST**.

***

## Agent 1 — Onboard & Plan

**What it does:** Connects to your apps, discovers exactly what's available, and defines every rule before anything is built.

<Steps>
  <Step title="Connects to your apps">
    Authenticates with both platforms and confirms the connections are live. You'll see connections retrieved and verified in the chat, one by one.
  </Step>

  <Step title="Discovers what's available">
    Inspects both platforms — what data exists, what events fire, how fields are structured on each side. You'll see **API Endpoints Found** in the chat as it works.
  </Step>

  <Step title="Maps your workflow">
    Defines your workflow in precise terms — trigger, data, conditions, result. Asks targeted questions to prevent failures later:

    > *"Should we include the deal owner's name in the Slack message?"*
    >
    > *"Should this fire for all pipelines, or only your Enterprise pipeline?"*
    >
    > *"What should happen if the deal has no amount set?"*

    As the workflow is mapped, the **Flow** and **Mapping** panels begin to populate.
  </Step>

  <Step title="Locks down every edge case">
    Documents how your integration handles missing data, duplicate records, and conditions that should skip a run. Nothing is left to chance before the next agent starts.
  </Step>
</Steps>

<Tip>
  Answer the Onboarding Agent's questions as specifically as you can. The more it knows upfront, the fewer surprises after go-live.
</Tip>

***

## Agent 2 — Generate & Map

**What it does:** Builds the integration shaped to your exact workflow — your field mappings, your business rules, every edge case the first agent defined.

This isn't a generic template being filled in. It's built specifically for how your business runs. As it works, files appear in the **Files** panel on the right.

***

## Agent 3 — Test & Refine

**What it does:** Runs a full test suite before anything goes live.

Every scenario documented by the Onboarding Agent — every trigger, condition, and edge case — gets validated against real data from your apps. If anything fails, the Testing Agent identifies exactly what's wrong, fixes it, and retests. This continues until the suite is clean.

<Warning>
  Deployment is blocked until every test passes. A problem caught here costs nothing. The same problem in production costs you data and time.
</Warning>

Follow results in real time in the **Progress** panel.

***

## Agent 4 — Deploy & Monitor

**What it does:** Ships the tested integration to production. No manual setup required.

Once testing is complete, the Deployment Agent takes over. Your credentials are stored securely and never exposed. From that point on, the integration runs automatically — every time its trigger fires.

***

## Once It's Live

After deployment, Fourgent keeps your integration running reliably in the background.

<CardGroup cols={2}>
  <Card title="Every Run Is Logged" icon="list-check">
    Every time your integration fires, it's recorded — what triggered it, what happened, whether it succeeded. Nothing fails silently. See the full history in **Workflow Runs**.
  </Card>

  <Card title="Automatic Retries" icon="rotate">
    If a connected app is temporarily unavailable, Fourgent retries automatically. Recovery happens without you doing anything.
  </Card>

  <Card title="One-Click Replay" icon="rotate-left">
    Any failed run can be replayed with its original data — no need to wait for the trigger to fire again.
  </Card>

  <Card title="Conditional Routing" icon="route">
    Workflows that take different paths depending on the data — different outcomes for different record types or values — handled automatically.
  </Card>
</CardGroup>

***

## Making Changes After Launch

Your integration doesn't freeze after it goes live. If your workflow changes — a new condition, a new field, a new app — describe the update in the chat. Fourgent handles it end to end: updates the integration, retests, and redeploys.

***

## Continue

<CardGroup cols={2}>
  <Card title="Workflow Runs" icon="table-list" href="/workflow-runs">
    Monitor every execution — filter, inspect, and replay runs.
  </Card>

  <Card title="Connections" icon="plug" href="/connections">
    Manage the app credentials your integrations depend on.
  </Card>

  <Card title="Tips for Prompting" icon="lightbulb" href="/tips-for-prompting">
    Get better integrations with a stronger first description.
  </Card>

  <Card title="Talk to the Team" icon="headset" href="/support">
    Complex use case? We'll scope it with you.
  </Card>
</CardGroup>
