Updated SKILL.md with pdf lay-out for inspection and Email Template
This commit is contained in:
@@ -240,17 +240,37 @@ Before creating generic outreach emails, check if the supplier has a specific wo
|
||||
|
||||
### Action
|
||||
|
||||
For all **remaining suppliers** (not covered by supplier-specific handling above), create drafts in a markdown file with emails per supplier so we can review them.
|
||||
For all **remaining suppliers** (not covered by supplier-specific handling above), create drafts with emails per supplier so we can review them.
|
||||
|
||||
> **CRITICAL RULE:** Bundle emails per supplier. Never create multiple emails to the same supplier. Group all delayed order lines for a supplier into ONE email in the markdown file.
|
||||
> **CRITICAL RULE:** Bundle emails per supplier. Never create multiple emails to the same supplier. Group all delayed order lines for a supplier into ONE email.
|
||||
|
||||
The email should include:
|
||||
### Email Template
|
||||
|
||||
- All affected order IDs and order detail IDs
|
||||
- Target dispatch dates
|
||||
- Product
|
||||
- Supplier Order
|
||||
- Carrier
|
||||
Always use the following template for supplier outreach emails:
|
||||
|
||||
```
|
||||
Hi Partner,
|
||||
|
||||
The orders listed below were due to be dispatched on the agreed target date, however they appear to not have been completed or sent yet.
|
||||
|
||||
[TABLE]
|
||||
|
||||
Please could you provide an urgent update on the current status of these orders and confirm when they will be ready for dispatch?
|
||||
|
||||
Thank you, and we look forward to your prompt response.
|
||||
```
|
||||
|
||||
The **[TABLE]** must have exactly these 5 columns:
|
||||
|
||||
| Column | Content | Format |
|
||||
|--------|---------|--------|
|
||||
| **Order** | Combined order + detail ID | `{id_order}-{id_order_detail}` (e.g. `5831128-9215018`) |
|
||||
| **Target Dispatch Date** | The agreed dispatch date | `DD Mon YYYY` (e.g. `31 Mar 2026`) |
|
||||
| **Product** | Product type/SKU | As returned by API |
|
||||
| **Supplier Order** | Supplier's own order number | Only if provided, otherwise omit column or show `-` |
|
||||
| **Carrier** | Intended carrier | As returned by API |
|
||||
|
||||
Do not deviate from this template. Do not add extra paragraphs, bullet points, or numbered lists asking for specific information — the template already covers everything needed.
|
||||
|
||||
|
||||
|
||||
@@ -307,6 +327,55 @@ Generate at end of processing and save as a file:
|
||||
|
||||
---
|
||||
|
||||
## **PDF Report Generation**
|
||||
|
||||
After completing Step 3, generate a professional PDF report using `reportlab`. The PDF serves as the primary deliverable for the traffic team to review and act on. Install with `pip install reportlab --break-system-packages` if not available.
|
||||
|
||||
### PDF Structure
|
||||
|
||||
The report has three main sections, each starting on a new page:
|
||||
|
||||
**Page 1 — Cover & Summary**
|
||||
- Title block with dark background: "Delay List Report — Step 3: Supplier Outreach Analysis" + date
|
||||
- Summary stat cards in a grid layout showing: Total Orders, HubSpot Hits, Need Outreach, Internal Issues, Masterprint (Skipped), Flyeralarm (Manual), Probo (Manual), Suppliers to Contact
|
||||
- Caveat note about HubSpot search scope limitations
|
||||
|
||||
**Section 1 — HubSpot Analysis**
|
||||
Colour-coded tables categorising orders with existing communication:
|
||||
- **1.1 Internal Issues** (red header) — orders blocked by artwork errors, API failures, retry limits, price disputes. These need Helloprint action, not supplier outreach.
|
||||
- **1.2 In Production / On Track / Reprints** (green header) — orders confirmed in production or with reprints underway. No outreach needed.
|
||||
- **1.3 Other Statuses** (blue header) — shipped, awaiting approval, customer issues, unclear status.
|
||||
- **1.4 HubSpot Tickets Found — Review Needed** (orange header) — tickets exist but need manual review to determine action.
|
||||
|
||||
Each table shows: Detail ID, Order, Supplier, Issue/Status.
|
||||
|
||||
**Section 2 — Manual Action Required**
|
||||
- **Flyeralarm** — order table with note that portal case creation is required
|
||||
- **Probo** — order table with note to verify in Probo portal
|
||||
- **Masterprint** — count + note that tracking is automated
|
||||
|
||||
**Section 3 — Supplier Outreach Emails**
|
||||
For each supplier (sorted by order count descending):
|
||||
- Supplier heading with order count
|
||||
- Draft email using the standard email template (see Email Template section above)
|
||||
- Embedded order table within the email block
|
||||
|
||||
### PDF Styling
|
||||
|
||||
Use these design principles for a clean, professional look:
|
||||
|
||||
- **Colours**: Dark navy (#1a1a2e) for title block, blue (#0f3460) for section headers, red (#e94560) for internal issues, green (#27ae60) for on-track, orange (#f39c12) for review-needed, blue (#2980b9) for other statuses
|
||||
- **Fonts**: Helvetica family (Bold for headers, Regular for body)
|
||||
- **Tables**: Dark header row with white text, alternating row backgrounds, thin grid lines (#bdc3c7), compact padding (2-3pt)
|
||||
- **Page**: A4, 18mm left/right margins, header line with "Helloprint | Delay List Step 3 Report | [date]", footer with "Confidential - Helloprint Operations" and page number
|
||||
- **Email blocks**: Separated by horizontal rules (blue #2980b9), not wrapped in a single table cell (large supplier email blocks with many orders must be able to split across pages)
|
||||
|
||||
### Implementation Note
|
||||
|
||||
Do NOT wrap email blocks in a single-cell Table flowable — suppliers with many orders (e.g. Yurchak with 40+ orders) will overflow a single page and cause a LayoutError. Instead, use individual flowables (Paragraph, Table, Spacer) separated by HRFlowable dividers. This allows reportlab to split content naturally across page breaks.
|
||||
|
||||
---
|
||||
|
||||
## **MCP & API Integration Points**
|
||||
|
||||
| Action | Integration | Template/Endpoint |
|
||||
|
||||
Reference in New Issue
Block a user