> For the complete documentation index, see [llms.txt](https://docs.kick.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kick.co/ai/cli/cli-use-case-library/reconciliation-and-cleanup.md).

# Reconciliation and Cleanup

<details>

<summary><strong>Daily uncategorized transaction alert</strong> (read)</summary>

To get a Slack message when transactions still lack a category, count uncategorized rows and post a summary.

**The Script**

```bash
#!/bin/bash
# daily-uncategorized-alert.sh

WORKSPACE_ID="<workspace-id>"
WEBHOOK_URL="https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK"
SINCE="$(date -v-30d +%Y-%m-%d 2>/dev/null || date -d '30 days ago' +%Y-%m-%d)"

rows=$(kick --workspace "$WORKSPACE_ID" transactions find \
  --since "$SINCE" \
  --fields id,date,category \
  --output json \
  | jq '[.[] | select(.category == null or .category == "")]')

count=$(echo "$rows" | jq 'length')

if [ "$count" -gt 0 ]; then
  oldest=$(echo "$rows" | jq -r 'sort_by(.date) | .[0].date')
  message="*$count uncategorized transactions in the last 30 days*\nOldest: $oldest\n<https://app.kick.co/transactions|Review in Kick>"

  curl -X POST "$WEBHOOK_URL" \
    -H 'Content-Type: application/json' \
    -d "{\"text\":\"$message\"}"

  echo "Alert sent: $count uncategorized transactions"
else
  echo "No uncategorized transactions in range"
fi
```

**How to Customize**

* Change `SINCE` to match your firm's review window
* Add a threshold: only alert when `count` exceeds 10
* Schedule with cron to run each morning

**What It Outputs**

```
Alert sent: 23 uncategorized transactions
```

</details>

<details>

<summary><strong>Find transactions missing a memo</strong> (read)</summary>

To export transactions that still need a memo before close, filter JSON output client-side.

**The Script**

```bash
#!/bin/bash
# find-missing-memos.sh

WORKSPACE_ID="<workspace-id>"
SINCE="2026-01-01"
UNTIL="2026-01-31"
OUTPUT_FILE="missing-memos.csv"

echo "date,amount,counterparty,id" > "$OUTPUT_FILE"

kick --workspace "$WORKSPACE_ID" transactions find \
  --since "$SINCE" \
  --until "$UNTIL" \
  --fields id,date,amount,counterparty,memo \
  --output json | \
jq -r '.[] | select(.memo == null or .memo == "") | [.date, .amount, .counterparty, .id] | @csv' >> "$OUTPUT_FILE"

count=$(tail -n +2 "$OUTPUT_FILE" | wc -l | tr -d ' ')

echo "Found $count transactions without a memo"
echo "Exported to $OUTPUT_FILE"
```

**How to Customize**

* Also require a category: `select((.memo == null or .memo == "") or (.category == null or .category == ""))`
* Add `--limit` and page with `--cursor` when the workspace has many rows

**What It Outputs**

```
Found 15 transactions without a memo
Exported to missing-memos.csv
```

</details>

<details>

<summary><strong>Review recent category changes</strong> (read)</summary>

To see what changed on transactions before you adjust anything else, list recent activity filtered to category updates.

**The Script**

```bash
#!/bin/bash
# review-category-activity.sh

WORKSPACE_ID="<workspace-id>"

kick --workspace "$WORKSPACE_ID" activity list \
  --resource-type transaction \
  --changed-fields categoryId \
  --limit 25 \
  --output json | jq .
```

**How to Customize**

* Add `--entity-ids` when you only care about one entity
* Pipe to a file for audit records: `> category-activity-$(date +%Y%m%d).json`

**What It Outputs**

* JSON activity rows showing recent transaction category changes

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kick.co/ai/cli/cli-use-case-library/reconciliation-and-cleanup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
