Safin E2E Data Model
Generated records and manifest fields for repeatable Safin E2E runs
Generated Names
Every run uses a label like SAFIN-E2E-NIC-20260512T150405Z. The label prefixes every generated Vendor, Warehouse, item, lead company, commission configuration, and manual Sales Order label.
The manifest stores:
{
"runKey": "SAFIN-E2E-NIC-20260512T150405Z",
"generatedNames": {},
"providerReferences": {},
"phaseStatus": {},
"resume": {}
}Setup Records
The setup phase creates:
| Type | Count | Purpose |
|---|---|---|
| Vendor Account | 3 | Raw material, packaging, and contract manufacturing PO suppliers |
| Internal Warehouse | 3 | Non-3PL materials, production staging, and accounting adjustment lines |
Existing 3PL warehouses are only referenced:
| Warehouse | Integration |
|---|---|
| Pakmo | OrderDesk/Packiyo |
| Kandy Kush | Katana |
Provider-backed fulfillment expects one sync request per provider warehouse represented by fulfillable Sales Order lines. Shipping, tax, credit, labor, service, and other nonphysical lines should remain on Salesforce financial records but must not be sent as provider order rows.
Items
The run creates about 15 items; the current generator creates 16 so tax, credit, and adjustment lines are explicit.
| Class | Count | Notes |
|---|---|---|
| Finished goods | 6 | Three Pakmo/OrderDesk/Packiyo items and three Kandy Kush/Katana items |
| Raw materials | 2 | Nicotine salt blend and pouch substrate |
| Packaging | 1 | Retail tin and label kit |
| WIP | 1 | Filled pouch core |
| Labor | 1 | Batch assembly labor |
| Service | 1 | COA quality release |
| Shipping | 1 | Adult-signature freight quote line |
| Tax | 1 | Nicotine state excise tax line |
| Credit | 1 | Retailer launch credit |
| Adjustment | 1 | Inventory true-up adjustment |
Finished goods are also split evenly across payment gateways for payment-routing coverage:
| Gateway | Finished goods |
|---|---|
| Sandbox A | 3 |
| Sandbox B | 3 |
Restricted picklist labels are resolved in the org UI at runtime. The generator carries preferred labels, but the operator should use the nearest allowed org value if the sandbox picklist differs.
BOMs
The BOM plan is multi-level:
The assertion target is at least 21 BOM_Component__c rows: three WIP components plus three components for each of six finished goods.
Business Records
The CRM phase creates duplicate Leads with the same generated email, exercises merge/transfer behavior, then converts to Account, Contact, and Opportunity.
The quote/order phase uses the converted Account. It must produce one quote-converted Sales Order and one manually filled Sales Order. The fulfillment phase must write provider status or tracking evidence back to Salesforce for the Pakmo and Kandy Kush orders.
Last updated on