# zoho/zohofinance-automation-samples architecture

> Architecture diagram of the GitHub repository zoho/zohofinance-automation-samples, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zoho/zohofinance-automation-samples
- Repository: https://github.com/zoho/zohofinance-automation-samples

## Overview

This repository is a catalog of independent Zoho Books custom-function examples, not a single application pipeline. Users choose a function, configure its module and trigger in Zoho Books, then customize and save it. The examples cover transaction automation, purchasing and inventory, customer communications, and CRM/account integrations. The README names these capabilities, but no function source was provided, so edges show only relationships explicitly stated by the documented use cases; internal calls and detailed runtime wiring are omitted.

Main entry points: [`CustomFunctions/convert_estimate_to_salesorder_automatically.ds`](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/convert_estimate_to_salesorder_automatically.ds) (Estimate to sales order), [`CustomFunctions/add_additional_charges_to_invoice.ds`](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/add_additional_charges_to_invoice.ds) (Invoice charges), [`CustomFunctions/apply_unused_credits_to_invoice.ds`](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/apply_unused_credits_to_invoice.ds) (Apply invoice credits), [`CustomFunctions/late_fee_add_a_new_invoice.ds`](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/late_fee_add_a_new_invoice.ds) (Late fee invoice)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_transactions["Transaction automation"]
  node_estimate_to_so["Estimate to sales order"]
  node_additional_charges["Invoice charges"]
  node_unused_credits_invoice["Apply invoice credits"]
  node_late_fee["Late fee invoice"]
  node_margin["Transaction margin"]
end

subgraph group_purchasing["Purchasing and inventory"]
  node_po_from_so["Sales order to PO"]
  node_auto_approve["Auto-approve PO<br/>[auto_approve_po.ds]"]
  node_cost_price["Bill cost update"]
  node_low_stock["Low-stock email"]
end

subgraph group_customer["Customer operations"]
  node_customer_statement["Customer statement"]
  node_unpaid_invoices["Unpaid invoices"]
  node_item_catalogue["Item catalogue"]
  node_loyalty["Loyalty points<br/>[loyalty_point.ds]"]
end

subgraph group_integrations["CRM and integrations"]
  node_create_deal["Estimate creates deal"]
  node_fetch_deal["Fetch deal fields"]
  node_update_deal["Update deal stage"]
  node_draft_cliq["Draft invoice alert"]
end

node_user(("Books administrator"))
node_books["Zoho Books"]
node_customer(("Customer"))
node_crm["Zoho CRM"]
node_cliq["Zoho Cliq"]

node_user -->|"configures triggers"| node_books
node_books -->|"runs on estimate"| node_estimate_to_so
node_estimate_to_so -->|"creates sales order"| node_books
node_books -->|"runs for invoices"| node_additional_charges
node_additional_charges -->|"adds charges"| node_books
node_books -->|"runs on invoice"| node_unused_credits_invoice
node_unused_credits_invoice -->|"applies credits"| node_books
node_books -->|"runs for overdue invoices"| node_late_fee
node_late_fee -->|"creates invoice"| node_books
node_books -->|"calculates transaction margin"| node_margin
node_books -->|"runs on sales order"| node_po_from_so
node_po_from_so -->|"creates purchase order"| node_books
node_books -->|"checks purchase order"| node_auto_approve
node_auto_approve -->|"approves purchase order"| node_books
node_books -->|"runs on bill"| node_cost_price
node_cost_price -->|"updates item cost"| node_books
node_books -->|"checks stock"| node_low_stock
node_low_stock -->|"schedules email"| node_customer
node_books -->|"schedules statement"| node_customer_statement
node_customer_statement -->|"sends statement"| node_customer
node_books -->|"selects unpaid invoices"| node_unpaid_invoices
node_unpaid_invoices -->|"sends invoices"| node_customer
node_books -->|"selects item catalogue"| node_item_catalogue
node_item_catalogue -->|"sends catalogue"| node_customer
node_books -->|"calculates loyalty points"| node_loyalty
node_books -->|"runs on estimate creation"| node_create_deal
node_create_deal -->|"creates deal"| node_crm
node_crm -->|"provides deal fields"| node_fetch_deal
node_fetch_deal -->|"updates related estimate"| node_books
node_books -->|"triggers stage update"| node_update_deal
node_update_deal -->|"updates deal stage"| node_crm
node_books -->|"selects draft invoices"| node_draft_cliq
node_draft_cliq -->|"sends to channel"| node_cliq

click node_estimate_to_so "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/convert_estimate_to_salesorder_automatically.ds"
click node_additional_charges "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/add_additional_charges_to_invoice.ds"
click node_unused_credits_invoice "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/apply_unused_credits_to_invoice.ds"
click node_late_fee "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/late_fee_add_a_new_invoice.ds"
click node_margin "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/transaction_level_margin.ds"
click node_po_from_so "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/Create-PO-From-SO.ds"
click node_auto_approve "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/auto_approve_po.ds"
click node_cost_price "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/update_cost_price_during_bill_creation.ds"
click node_low_stock "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/schedule_email_for_low_stock_items.ds"
click node_customer_statement "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/schedule_customer_statement.ds"
click node_unpaid_invoices "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/send_unpaidinvoices%5Bconsolidated%5D_to_customers.ds"
click node_item_catalogue "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/send_item_catalogue.ds"
click node_loyalty "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/loyalty_point.ds"
click node_create_deal "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/create_deal_from_estimate_automatically.ds"
click node_fetch_deal "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/fetch_deals_field_value_in_related_estimates.ds"
click node_update_deal "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/update-deal-stage.ds"
click node_draft_cliq "https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/draft_invoices_to_cliq.ds"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_estimate_to_so,node_additional_charges,node_unused_credits_invoice,node_late_fee,node_margin toneBlue
class node_po_from_so,node_auto_approve,node_cost_price,node_low_stock toneAmber
class node_customer_statement,node_unpaid_invoices,node_item_catalogue,node_loyalty toneMint
class node_create_deal,node_fetch_deal,node_update_deal,node_draft_cliq toneRose
class node_user,node_books,node_customer,node_crm,node_cliq toneIndigo
```

## Components

### Transaction automation

- [Estimate to sales order](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/convert_estimate_to_salesorder_automatically.ds): `CustomFunctions/convert_estimate_to_salesorder_automatically.ds`
- [Invoice charges](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/add_additional_charges_to_invoice.ds): `CustomFunctions/add_additional_charges_to_invoice.ds`
- [Apply invoice credits](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/apply_unused_credits_to_invoice.ds): `CustomFunctions/apply_unused_credits_to_invoice.ds`
- [Late fee invoice](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/late_fee_add_a_new_invoice.ds): `CustomFunctions/late_fee_add_a_new_invoice.ds`
- [Transaction margin](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/transaction_level_margin.ds): `CustomFunctions/transaction_level_margin.ds`

### Purchasing and inventory

- [Sales order to PO](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/Create-PO-From-SO.ds): `CustomFunctions/Create-PO-From-SO.ds`
- [Auto-approve PO](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/auto_approve_po.ds): `CustomFunctions/auto_approve_po.ds`
- [Bill cost update](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/update_cost_price_during_bill_creation.ds): `CustomFunctions/update_cost_price_during_bill_creation.ds`
- [Low-stock email](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/schedule_email_for_low_stock_items.ds): `CustomFunctions/schedule_email_for_low_stock_items.ds`

### Customer operations

- [Customer statement](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/schedule_customer_statement.ds): `CustomFunctions/schedule_customer_statement.ds`
- [Unpaid invoices](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/send_unpaidinvoices%5Bconsolidated%5D_to_customers.ds): `CustomFunctions/send_unpaidinvoices[consolidated]_to_customers.ds`
- [Item catalogue](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/send_item_catalogue.ds): `CustomFunctions/send_item_catalogue.ds`
- [Loyalty points](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/loyalty_point.ds): `CustomFunctions/loyalty_point.ds`

### CRM and integrations

- [Estimate creates deal](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/create_deal_from_estimate_automatically.ds): `CustomFunctions/create_deal_from_estimate_automatically.ds`
- [Fetch deal fields](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/fetch_deals_field_value_in_related_estimates.ds): `CustomFunctions/fetch_deals_field_value_in_related_estimates.ds`
- [Update deal stage](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/update-deal-stage.ds): `CustomFunctions/update-deal-stage.ds`
- [Draft invoice alert](https://github.com/zoho/zohofinance-automation-samples/blob/main/CustomFunctions/draft_invoices_to_cliq.ds): `CustomFunctions/draft_invoices_to_cliq.ds`

### Other components

- **Books administrator**
- **Zoho Books**
- **Customer**
- **Zoho CRM**
- **Zoho Cliq**

## Connections

- Books administrator → Zoho Books: configures triggers
- Zoho Books → Estimate to sales order: runs on estimate
- Estimate to sales order → Zoho Books: creates sales order
- Zoho Books → Invoice charges: runs for invoices
- Invoice charges → Zoho Books: adds charges
- Zoho Books → Apply invoice credits: runs on invoice
- Apply invoice credits → Zoho Books: applies credits
- Zoho Books → Late fee invoice: runs for overdue invoices
- Late fee invoice → Zoho Books: creates invoice
- Zoho Books → Transaction margin: calculates transaction margin
- Zoho Books → Sales order to PO: runs on sales order
- Sales order to PO → Zoho Books: creates purchase order
- Zoho Books → Auto-approve PO: checks purchase order
- Auto-approve PO → Zoho Books: approves purchase order
- Zoho Books → Bill cost update: runs on bill
- Bill cost update → Zoho Books: updates item cost
- Zoho Books → Low-stock email: checks stock
- Low-stock email → Customer: schedules email
- Zoho Books → Customer statement: schedules statement
- Customer statement → Customer: sends statement
- Zoho Books → Unpaid invoices: selects unpaid invoices
- Unpaid invoices → Customer: sends invoices
- Zoho Books → Item catalogue: selects item catalogue
- Item catalogue → Customer: sends catalogue
- Zoho Books → Loyalty points: calculates loyalty points
- Zoho Books → Estimate creates deal: runs on estimate creation
- Estimate creates deal → Zoho CRM: creates deal
- Zoho CRM → Fetch deal fields: provides deal fields
- Fetch deal fields → Zoho Books: updates related estimate
- Zoho Books → Update deal stage: triggers stage update
- Update deal stage → Zoho CRM: updates deal stage
- Zoho Books → Draft invoice alert: selects draft invoices
- Draft invoice alert → Zoho Cliq: sends to channel
