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

# Automated Tasks

> Create rules in plain language, let AI watch and act for you

# Automated Tasks

Optima Sentinel lets you set up automation rules: **If X happens, do Y for me**.

```
👤 Watch SoundPro's price. If it drops more than 10%, lower my price by 8%

🤖 Done! Auto-pricing rule created:
   ├─ Check SoundPro's price every 6 hours
   ├─ If price drops more than 10%, generate a repricing plan
   ├─ Send for your approval before executing
   └─ ✅ Rule created
```

## How It Works

<Steps>
  <Step title="Describe your rule">
    Use plain language, like "Notify me when inventory drops below 10"
  </Step>

  <Step title="AI creates the rule">
    Automatically understands your intent, sets check frequency and trigger conditions
  </Step>

  <Step title="Scheduled execution">
    Sentinel automatically checks at the configured frequency
  </Step>

  <Step title="Trigger action">
    When conditions are met, AI takes action or sends a notification for your approval
  </Step>
</Steps>

## Use Cases

### Competitor Monitoring

```
Watch SoundPro. If they drop price by more than 10%, lower mine by 8%
```

```
Watch SoundPro and notify me when they launch new products
```

### Inventory Management

```
Send a purchase order to the supplier when inventory drops below 10 units
```

```
Auto-delist products when they're out of stock
```

### Social Media

```
List my limited edition when TikTok views hit 100K
```

```
Notify me if anyone complains about our product on social media
```

### Review Management

```
Draft a reply when there's a new negative review
```

```
Notify me of any brand mentions on Reddit
```

### Auto-Fulfillment

```
Automatically generate and ship digital products when ordered
```

## Full Scenario List

| Scenario                    | You say                                            | AI does                                              |
| --------------------------- | -------------------------------------------------- | ---------------------------------------------------- |
| Competitor repricing        | "SoundPro drops 10%, I drop 8%"                    | Check competitor → Generate plan → Approve → Execute |
| Viral video → list product  | "List limited edition when TikTok hits 100K views" | Check views → List product when reached              |
| Low stock reorder           | "Reorder when inventory drops below 10"            | Check stock → Generate PO → Send email               |
| Negative review reply       | "Draft a reply for negative reviews"               | Monitor reviews → Sentiment analysis → Draft reply   |
| Digital product fulfillment | "Auto-generate and ship on order"                  | Check orders → AI generate → Fulfill                 |
| New product alert           | "Tell me when SoundPro launches something new"     | Check competitor → Notify on new products            |
| Social sentiment            | "Notify me of complaints about us"                 | Cross-platform search → Sentiment → Push alert       |

## Creating Rules

### Conversational

Just tell AI what you want to monitor in plain language:

```
Set up a rule: check inventory every morning, notify me for items below 20 units
```

```
Check competitor prices every 6 hours
```

```
Send me a weekly sales report every Monday via email
```

AI will automatically understand and create the rule, including check frequency, trigger conditions, and actions.

### Check Frequency

You can specify how often to check:

| You say            | Frequency       |
| ------------------ | --------------- |
| "Check every hour" | Every 1 hour    |
| "Every 6 hours"    | Every 6 hours   |
| "Check daily"      | Every 24 hours  |
| "Every Monday"     | Weekly Cron     |
| "Weekdays at 9 AM" | Cron expression |

<Tip>
  Not sure about frequency? Just describe your needs and AI will recommend an appropriate interval. For example, competitor pricing every 6 hours, inventory checks once daily.
</Tip>

## Managing Rules

### View Rules

```
Show all my monitoring rules
```

```
Which rules are currently running?
```

### Pause and Resume

```
Pause the competitor repricing rule
```

```
Resume inventory monitoring
```

### Manual Trigger

```
Check competitor prices right now
```

Run immediately without waiting for the next scheduled time.

### View Execution Logs

```
Show recent execution logs for the repricing rule
```

See results of each execution: whether conditions were met and what actions were taken.

### Delete Rules

```
Delete the competitor repricing rule
```

## Approval Workflow

For rules involving money or critical operations, Sentinel will ask for your confirmation before executing.

### Scenarios Requiring Approval

* Adjusting product prices
* Creating or modifying products
* Sending emails to suppliers
* Other financial operations

### Approval Channels

You can approve through three channels:

<CardGroup cols={3}>
  <Card title="AI Chat">
    Reply "approve" or "reject" directly in the conversation
  </Card>

  <Card title="Email">
    Click the approval button in the notification email
  </Card>

  <Card title="Dashboard">
    Review and approve in the Dashboard
  </Card>
</CardGroup>

### Auto-Execute

If you trust a rule, you can enable auto-execution:

```
Set the repricing rule to auto-execute without approval
```

<Warning>
  In auto-execute mode, AI will take action immediately without waiting for confirmation. Only enable this for low-risk operations.
</Warning>

## Notification Settings

### Channels

| Channel | Description                                                    |
| ------- | -------------------------------------------------------------- |
| AI Chat | Receive notifications in the conversation (enabled by default) |
| Email   | Send to your email address                                     |
| Webhook | Push to a custom URL                                           |

### Configure Notifications

```
Also send repricing results to my email tom@example.com
```

```
Send inventory alerts to my Webhook
```

### Daily Digest

```
Send me a daily execution summary at 9 AM
```

Get an overview of all rule executions at a glance.

## Failure Handling

If a rule execution fails (e.g., network timeout), Sentinel will:

1. **Auto-retry** — With increasing intervals (30s → 1min → 5min → 15min)
2. **Failure alert** — Notify you after multiple consecutive failures
3. **Auto-pause** — Stop automatically if errors accumulate, preventing wasteful execution

<Note>
  When you receive a failure alert, check if the rule configuration is correct, or manually trigger a run to diagnose the issue.
</Note>

## Scout + Sentinel Combo

Scout **discovers**, Sentinel **watches**.

<AccordionGroup>
  <Accordion title="Research → Monitor workflow">
    1. Use Scout to discover a trending competitor product SoundPro
    2. Set up a Sentinel rule: "Watch SoundPro, notify me if price drops more than 10%"
    3. A week later SoundPro drops 15%, Sentinel notifies you
    4. You approve, AI automatically adjusts your product price
  </Accordion>

  <Accordion title="Social trend → Auto-list">
    1. Use Scout to discover a trending product on TikTok
    2. Set up a Sentinel rule: "Auto-list the product when this video hits 500K views"
    3. Video goes viral, Sentinel triggers the listing process
  </Accordion>
</AccordionGroup>

## Best Practices

<CardGroup cols={2}>
  <Card title="Start with notifications">
    Set up notification-only rules first, then enable auto-execution once comfortable
  </Card>

  <Card title="Reasonable frequency">
    No need to check every minute — choose frequency based on the scenario
  </Card>

  <Card title="Approve critical actions">
    Enable approval for operations involving price, inventory, or money
  </Card>

  <Card title="Review rules regularly">
    Clean up rules you no longer need to avoid wasteful execution
  </Card>
</CardGroup>

<Warning>
  Automation rules act on your behalf. Make sure your rule descriptions are clear and accurate. Start with notification mode, observe for a while, then switch to auto-execution once you're confident in the results.
</Warning>
