Agriculture
Agricultural businesses face complexity because data is scattered across 3 areas: the farm (IoT + labor), the market (prices + orders), and the supply chain (logistics + quality). PBCP consolidates events from all 3 areas into a single Crop Story and Farm Story.
Business problems solved
| Problem | How PBCP solves it |
|---|---|
| No way to know if this season's plot yield is better or worse than last year | Crop Story → yield history per plot per season |
| Impossible to monitor hundreds of sensors | IoT event stream → anomaly detection → alert |
| No idea what today's market price is or whether to sell or hold | Market Intelligence → average price + trend + recommendation |
| No traceability for where this harvest lot went or whether it passed quality checks | Harvest Story → traceability from field to buyer |
| Small-scale farmers struggle to access credit | Farm Context → yield track record → credit scoring |
Story types
Farm Story
How many plots does this farm have? What was the average yield last year?
Crop Story
When was this crop planted? What fertilizer was used? How much was harvested?
Harvest Story
Who received this lot? At what price? Did it pass quality standards?
IoT Story
Are this plot's sensor readings normal? Were there periods of too little or too much water?
Key events
| Event | actor.type | Occurs when |
|---|---|---|
farm.registered | system | New farm registered in the system |
plot.created | farmer | New plot added with GPS boundary |
crop.planted | farmer | Planting begins; crop type, variety, and area specified |
crop.fertilized | farmer | Fertilizer applied (type + quantity + method) |
crop.irrigated | farmer / device | Irrigation performed (manual or automated) |
crop.sprayed | farmer | Pesticide applied (type + quantity + reason) |
crop.disease_detected | farmer / system | Disease or pest detected |
crop.disease_treated | farmer | Treatment applied |
sensor.reading | device | IoT reading taken (soil moisture, temp, pH, humidity) |
sensor.alert | system | Sensor value exceeds threshold → alert triggered |
weather.event | system | Heavy rain, drought, storm — from weather API |
crop.harvest_started | farmer | Harvest begins |
crop.harvested | farmer | Harvest complete; yield specified (kg) |
harvest.quality_checked | staff / buyer | Quality inspection performed; grade assigned |
harvest.sold | farmer | Sale made; buyer, price, and weight specified |
harvest.delivered | driver | Delivered to buyer / factory / market |
payment.received | system | Payment received from sale |
loan.applied | farmer | Loan application submitted |
loan.approved | system | Loan approved (referencing yield history) |
input.purchased | farmer | Agricultural inputs purchased (seeds, fertilizer, pesticide) |
certification.applied | farmer | GAP / Organic certification application submitted |
certification.approved | system | Certification received |
Intelligence use cases
| Use case | Signal | Action |
|---|---|---|
| Irrigation alert | sensor.reading soil_moisture < threshold | LINE notification: "Plot A3 soil is dry — irrigate now" |
| Harvest timing | Days since crop.planted + degree-day model | Recommend optimal harvest window |
| Disease early warning | High temperature + humidity → high-risk pattern | Alert farmer to inspect the plot |
| Market price alert | Market price 15% above average | "Today's lime price is good — time to sell?" |
| Credit scoring | Yield history + on-time payment record | Used by banks to evaluate credit applications |
| Input optimization | Fertilizer volume vs historical yield | Recommend most efficient dosage |
| Yield forecast | Weather + historical pattern + growth stage | Estimate yield 2 weeks before harvest |
Crop story timeline
crop.planted → 15 Mar (Tomatoes, SVR variety, plot B2, 2 rai)
sensor.reading → every 1 hr (soil_moisture, temp, humidity)
crop.irrigated → 17 Mar (auto-irrigate, 450 liters)
crop.fertilized → 25 Mar (15-15-15 formula, 20 kg/rai)
weather.event → 2 Apr (heavy rain 85 mm — risk waterlogging)
sensor.alert → 2 Apr (soil_moisture exceeds threshold)
crop.disease_detected → 10 Apr (thrips detected)
crop.disease_treated → 11 Apr (biological pesticide applied)
crop.harvest_started → 20 May
crop.harvested → 22 May (yield: 3,200 kg / 2 rai = 1,600 kg/rai)
harvest.quality_checked → 22 May (grade A: 80%, grade B: 20%)
harvest.sold → 23 May (buyer: processing plant, price ฿18/kg)
harvest.delivered → 24 May
payment.received → 25 May (฿57,600)
Gross margin: ฿57,600 − cost ฿24,000 = ฿33,600 (58%)
Yield vs last season: +12% (from 1,430 → 1,600 kg/rai)IoT sensor context
PBCP receives sensor.reading events with the following structure:
{
"eventName": "sensor.reading",
"actor": { "type": "device", "id": "sensor-B2-001" },
"payload": {
"plotId": "plot-B2",
"readings": {
"soil_moisture": 42.5,
"soil_temp": 28.3,
"air_temp": 33.1,
"humidity": 68,
"ph": 6.4,
"ec": 1.2
},
"unit": { "soil_moisture": "%", "temp": "°C", "ph": "pH", "ec": "dS/m" }
}
}Alert thresholds are configurable per tenant and per crop type — Intelligence triggers sensor.alert when values exceed or fall below the specified range.
Farm-to-market traceability
Every harvest lot has a harvestId that traces back to the plot → planting date → inputs used → farmer:
harvestId: HRV-20260522-B2
↑ plotId: plot-B2 (Farm: Somchai Garden, Nakhon Pathom)
↑ crop.planted: 15 Mar
↑ Variety: SVR-tomato-001
↑ Fertilizer: input.purchased INP-0325
↑ Pesticide: biological INP-0411
harvest.quality_checked: grade A cert
harvest.sold → ABC Factory, RatchaburiConsumers scan the QR code on the packaging → full information displayed.