# Rules and tasks

Each workflow has two components: **rules** (filter criteria that control which calls qualify) and **tasks** (actions that run on qualifying calls).

> **Note:** This page covers Workflow Rules & Tasks. For Call Flow Actions, see: [Add-ons, filters and routing options](https://help.nimbata.com/call-handling/call-flows#add-ons-filters-and-routing-options).

## Rules (filter criteria)

Rules narrow the set of calls a workflow acts on. All rule conditions must be met unless you configure OR logic.

> **Tip:** See [Branches, conditions and examples](https://help.nimbata.com/workflows/workflow-logic#branches-conditions-and-examples) for details on AND/OR logic.

### AI

**Free Text Question (AI):** Ask Nimbata AI any call-related yes/no question. For example: *"Was the caller a returning customer?"*

### Call Details

- **1st Time Caller (1yr)**: Identifies whether a caller is new or repeat within the past 365 days.
- **Call Duration:** Filters by call length in seconds (equal to, more than, less than, or within a range).
- **Call Outcome:** Filters by outcome: Answered, Not Answered, Answered or Voicemail, or Blocked.
- **Call Type:** Filters by how the call flow routed the call. The rule's labels differ from the call flow builder's: **Regular** is a single Dial, **Multi** is Multiple ([ring several numbers at once](https://help.nimbata.com/call-handling/call-routing#ring-several-numbers-at-once)), **Priority** is Sequential ([ring numbers in order](https://help.nimbata.com/call-handling/call-routing#ring-numbers-in-order)), and **Weighted** is Weighted ([split calls by percentage](https://help.nimbata.com/call-handling/call-routing#split-calls-by-percentage)).
- **Caller:** Filters by caller number (equal to, begins with, ends with, contains, includes, or excludes one or more prefixes).
- **Caller Name:** Filters by caller name using the same string match options.
- **Calling Country:** Filters by one or more countries based on calling prefixes.
- **Destination:** Filters by destination number using string match options.
- **Digits Pressed by Caller:** Filters by digits the caller pressed during the call.
- **Digits Pressed by Destination:** Filters by digits the destination pressed during the call.
- **Hangup Cause:** Filters by termination reason: Capped, Hangup, Invalid Key Entry, Lose Race, No Answer, No Call Flow, Normal Clearing, Originator Cancel, Spam Filter, User Busy, or Other.
- **Recording:** Filters by whether a recording is present.
- **Recordings (stopped):** Filters by whether the recording was stopped mid-call.
- **Talk Duration:** Filters by active talking time in seconds.
- **Time:** Filters by time of day (before, after, or within a time window).
- **Times Called:** Filters by how many times a caller's number has called (equal to, more than, less than, or within a range).
- **Tracking Number:** Filters by specific tracking numbers using string match options.
- **Transcriptions:** Filters by whether a transcription is present.
- **Voicemail:** Filters by whether a voicemail is present.

### Attribution\*

- **Call Page:** Filters by the page the call originated from.
- **Click ID:** Filters by the click ID associated with the call.
- **Device Type:** Filters by device: Desktop, Mobile, Tablet, or Unknown.
- **Source Type:** Filters by ad source type (All Digital, Custom Parameters, Direct, Email/Newsletter, Google Ads Call Extension, Google My Business, Impression, Offline, Online Paid, Organic Search, Other, Print, Radio, Referrers (All), SMS, Social, or TV).
- **UTM Campaign:** Filters by campaign ID string.
- **UTM Medium:** Filters by UTM medium string.
- **UTM Source:** Filters by UTM source string.

### Fields\*\*

- **Notes^:** Filters by whether spoken content matches specific words, phrases, or patterns.
- **Rating^:** Filters by call rating (1 to 5 stars).
- **Tag^:** Filters by Call Status tags (Appointment Booked, Call Back Requested, Follow-up Scheduled, Call Dropped / Technical Issue, Conversion, Existing Customer, No Answer, Not Interested, Qualified Lead, Sale Confirmed, SPAM, or Wrong Number) or Sentiment tags (Angry, Frustrated, Happy, Mixed, or Satisfied).
- **Value^:** Filters by monetary value assigned to a call.

### Conversation

- **Word & Phrase Spotting:** Filters by words or phrases spoken by the caller, the destination, or both. Define the terms and choose whether all or any must appear.

### Other

- **Call Flow:** Connects a workflow to one or more call flows.
- **Swap Group:** Connects a workflow to one or more swap groups.

## Tasks (actions)

Tasks define what Nimbata does when a call passes all the rules.

**Transcribe Call:** Converts call recordings into text. This is the foundation for all AI-powered tasks.

### Update Field\*\*

> **Note:** ^The following four fields use the same parameters as their rule equivalents and also support a Fill with AI option.

- **Tags:** Apply tags to the call. With Fill with AI, instruct Nimbata AI how to tag and which tags it can apply.
- **Notes:** Add notes to the call. With Fill with AI, instruct Nimbata AI what to capture.
- **Rating:** Assign a star rating. With Fill with AI, instruct Nimbata AI how to score the call.
- **Value:** Assign a monetary value. With Fill with AI, instruct Nimbata AI how to calculate it.

### Perform an Action

- **Summarize Call:** Generates an AI summary of the call.
- **Add to Spam Filter:** Tags all qualifying calls as spam.

### Integrations

| Integration                  | What it does                                                    |
| ---------------------------- | --------------------------------------------------------------- |
| **Email Notifications**      | Sends call or SMS events to your inbox                          |
| **Google Ads**               | Pushes call conversions to Google Ads for campaign optimization |
| **Google Analytics**         | Sends call events to GA4                                        |
| **Slack**                    | Sends call alerts to a Slack channel                            |
| **Facebook**                 | Sends call events to Meta Events Manager                        |
| **Google Sheets**            | Exports call data to a Google Sheet                             |
| **HubSpot**                  | Creates or updates contacts in HubSpot                          |
| **Microsoft Ads**            | Pushes call conversions to Microsoft Ads                        |
| **Microsoft Dynamics Sales** | Creates or updates contacts in Microsoft Dynamics               |
| **Pipedrive**                | Syncs call activity to Pipedrive                                |
| **Salesforce**               | Syncs call activity to Salesforce                               |
| **Webhook**                  | Sends call data to any external web application or service      |
| **Zapier**                   | Connects to thousands of marketing, sales, and CRM tools        |
| **Zoho**                     | Creates or updates contacts in Zoho                             |
| **Cometly**                  | Streams call data to Cometly for ad attribution                 |

> **Tip:** \*Nimbata also supports custom attribution parameters and custom fields. See the guides below.

Detailed guide: [Cookie capture](https://help.nimbata.com/tracking/advanced-settings#cookie-capture)\
Detailed guide: [Create a custom field](https://help.nimbata.com/organize/custom-fields#create-a-custom-field)\
Detailed guide: [Create a workflow](https://help.nimbata.com/workflows/workflows#create-a-workflow)\
Detailed guide: [Firing order](https://help.nimbata.com/workflows/workflow-logic#firing-order)
