Shopify Auto Invoicing & Inventory
Run a simple, review-first Shopify operations workflow focused on order detection, invoice preparation, stock updates, and clear monthly reporting.
Keep outputs professional, merchant-friendly, and easy to validate before any external action.
Workflow
Use this sequence for complete requests:
- 1. collect store context
- detect new or relevant orders
- prepare invoice-ready billing data
- update stock tables
- summarize exceptions
- export a monthly operations report
1. Collect store context
Capture the operating brief before producing outputs.
Minimum inputs:
- - store name
- currency
- tax regime or VAT note
- invoice numbering rule if provided
- order date range or event trigger
- product SKU source
- current stock source
- desired report month
If details are missing, keep assumptions explicit and conservative.
2. Detect new orders
Use Shopify order exports, webhook payloads, user-provided CSV files, or manually reviewed order lists.
Capture these fields whenever possible:
- - orderid
- ordername
- createdat
- financialstatus
- fulfillmentstatus
- customername
- customer_email
- billing country
- shipping country
- currency
- line items
- SKU
- quantity
- subtotal
- tax
- shipping
- total price
Classify orders into these simple buckets:
- - readyforinvoice
- paidbutreviewneeded
- pendingpayment
- cancelledorignore
Rules:
- - invoice only orders that are paid or explicitly approved
- never invent tax data
- flag missing customer billing fields before invoice generation
3. Prepare invoice-ready billing data
Generate structured invoice rows rather than pretending to issue official accounting documents automatically.
For each invoice-ready order, prepare:
- - invoicenumber or placeholder
- invoicedate
- merchant legal name placeholder
- customer billing name
- customer billing address
- tax identifier if available
- line description
- quantity
- unit price
- tax amount
- total amount
- payment status
- source order reference
Use references/templates.md for invoice field structure and merchant-facing language.
If the user asks for a PDF, produce a professional invoice content block or a PDF-ready dataset unless a real PDF renderer is already available.
4. Update stock tables
After processing valid orders, create a stock movement view.
Recommended columns:
- - sku
- producttitle
- varianttitle
- openingstock
- quantitysold
- quantityrefunded
- netchange
- closingstock
- lowstockflag
- reordernote
Rules:
- - subtract sold quantities from stock
- add refunded quantities back only when explicitly confirmed
- flag negative resulting stock as INLINECODE1
- flag low stock using the user threshold, otherwise default to 5
Use scripts/stock_sync.py to compute a flat stock reconciliation file from inventory and order exports.
5. Summarize exceptions
Always produce a short exception section.
Include:
- - orders missing billing data
- unpaid orders excluded from invoicing
- orders with missing SKU data
- products with negative or low stock
- tax or currency mismatches
Keep this section concise and actionable.
6. Export monthly report
When the user asks for a monthly summary, include:
- - total orders processed
- paid orders
- pending-payment orders
- cancelled orders
- invoice-ready orders
- invoiced revenue
- tax total
- units sold
- top SKUs by quantity
- low-stock SKU count
Use scripts/monthly_ops_report.py to aggregate order and stock data into a compact CSV summary.
Output order
For a complete request, produce outputs in this order:
- 1. operating assumptions
- order status summary
- invoice-ready table
- stock reconciliation table
- exceptions list
- monthly report summary
Ease-of-use standard
Write for non-technical Shopify merchants.
Prefer:
- - plain labels
- compact tables or CSV-ready rows
- obvious status names
- clean summaries with next actions
Avoid:
- - jargon-heavy accounting language unless requested
- pretending an official invoice was sent when only a draft was prepared
- risky automation claims without source data
Compliance standard
Operate in a review-first and accounting-aware way.
Use this skill to support:
- - order review
- invoice preparation
- stock reconciliation
- monthly reporting
Do not claim legal or tax compliance beyond the data provided. Recommend accountant review when tax treatment is uncertain.
Community edition note
This free edition focuses on invoice-ready data prep, stock reconciliation, and simple monthly reporting. It intentionally excludes automated payment reminders, advanced PDF workflows, and richer finance automation.
Resources
Use bundled resources when useful:
- -
references/templates.md for invoice and report templates - INLINECODE5 to convert Shopify-style order JSON into invoice-ready CSV rows
- INLINECODE6 to reconcile stock from orders and inventory CSV files
- INLINECODE7 to build a simple monthly operations summary
Shopify 自动发票与库存管理
运行一个简单、先审核的Shopify运营工作流程,专注于订单检测、发票准备、库存更新和清晰的月度报告。
在任何外部操作之前,保持输出专业、对商家友好且易于验证。
工作流程
对于完整的请求,请按以下顺序操作:
- 1. 收集店铺上下文
- 检测新订单或相关订单
- 准备可开票的账单数据
- 更新库存表
- 汇总异常情况
- 导出月度运营报告
1. 收集店铺上下文
在生成输出前,捕获运营简报。
最低输入要求:
- - 店铺名称
- 货币
- 税务制度或增值税说明
- 发票编号规则(如有提供)
- 订单日期范围或事件触发条件
- 产品SKU来源
- 当前库存来源
- 所需报告月份
如果缺少详细信息,请保持假设明确且保守。
2. 检测新订单
使用Shopify订单导出、Webhook负载、用户提供的CSV文件或手动审核的订单列表。
尽可能捕获以下字段:
- - 订单ID
- 订单名称
- 创建时间
- 财务状态
- 履行状态
- 客户姓名
- 客户邮箱
- 账单国家
- 发货国家
- 货币
- 订单行项目
- SKU
- 数量
- 小计
- 税费
- 运费
- 总价
将订单分类为以下简单类别:
规则:
- - 仅对已付款或明确批准的订单开具发票
- 绝不虚构税务数据
- 在生成发票前标记缺少客户账单字段的订单
3. 准备可开票的账单数据
生成结构化的发票行,而非假装自动发布官方会计文件。
对于每个可开票的订单,准备以下内容:
- - 发票编号或占位符
- 发票日期
- 商家法定名称占位符
- 客户账单名称
- 客户账单地址
- 税务识别号(如有)
- 行项目描述
- 数量
- 单价
- 税额
- 总金额
- 付款状态
- 来源订单参考
使用 references/templates.md 获取发票字段结构和面向商家的语言。
如果用户要求PDF,请生成专业的发票内容块或PDF就绪数据集,除非已有真正的PDF渲染器可用。
4. 更新库存表
处理有效订单后,创建库存变动视图。
推荐列:
- - SKU
- 产品标题
- 变体标题
- 期初库存
- 已售数量
- 已退款数量
- 净变动
- 期末库存
- 低库存标记
- 补货备注
规则:
- - 从库存中减去已售数量
- 仅在明确确认后加回已退款数量
- 将负库存标记为 需审核
- 使用用户设定的阈值标记低库存,否则默认为5
使用 scripts/stock_sync.py 从库存和订单导出中计算平库存对账文件。
5. 汇总异常情况
始终生成简短的异常情况部分。
包括:
- - 缺少账单数据的订单
- 未付款且排除在开票之外的订单
- 缺少SKU数据的订单
- 库存为负或低库存的产品
- 税务或货币不匹配
保持此部分简洁且可操作。
6. 导出月度报告
当用户要求月度汇总时,包括:
- - 处理的订单总数
- 已付款订单
- 待付款订单
- 已取消订单
- 可开票订单
- 已开票收入
- 税费总额
- 已售单位数
- 按数量排名前SKU
- 低库存SKU数量
使用 scripts/monthlyopsreport.py 将订单和库存数据汇总为紧凑的CSV摘要。
输出顺序
对于完整请求,按以下顺序生成输出:
- 1. 运营假设
- 订单状态摘要
- 可开票表格
- 库存对账表
- 异常列表
- 月度报告摘要
易用性标准
面向非技术型Shopify商家编写。
偏好:
- - 简单标签
- 紧凑表格或CSV就绪行
- 明确的状态名称
- 包含后续操作的清晰摘要
避免:
- - 除非要求,否则避免使用术语繁多的会计语言
- 假装已发送正式发票,而实际仅准备了草稿
- 在没有源数据的情况下做出有风险的自动化声明
合规标准
以先审核、会计意识强的方式操作。
使用此技能支持:
不要声称超出所提供数据的法律或税务合规性。当税务处理不确定时,建议由会计师审核。
社区版说明
此免费版本专注于可开票数据准备、库存对账和简单的月度报告。有意排除了自动付款提醒、高级PDF工作流程和更丰富的财务自动化。
资源
在有用时使用捆绑资源:
- - references/templates.md 用于发票和报告模板
- scripts/invoiceexport.py 将Shopify风格的订单JSON转换为可开票的CSV行
- scripts/stocksync.py 从订单和库存CSV文件对账库存
- scripts/monthlyopsreport.py 构建简单的月度运营摘要