Work orders (jobs / OTs) represent field operations — installations, maintenance visits, repairs, and assembly tasks. Each job has a sequential code (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ency07/B2B/llms.txt
Use this file to discover all available pages before exploring further.
JOB-2026-NNN), an assigned technician, a priority level, planned start and end dates, and a lifecycle status. Jobs feed directly into the operaciones and tecnico dashboard views.
Job statuses
| Status | Description |
|---|---|
PENDIENTE | Scheduled — not yet started |
EN_PROGRESO | Field work currently in progress (EN_EJECUCION in the DB, normalized on read) |
COMPLETADA | Work completed |
CANCELADA | Cancelled |
Priority levels
Three priority levels are supported:ALTA (HIGH), MEDIA (MEDIUM), and BAJA (LOW). Priority values are stored in the database as English codes (HIGH, MEDIUM, LOW) and normalized to Spanish on read.
- ALTA jobs appear in the command center task queue (
queueTasks) and generateNotificationItementries for operations and technician roles.
getJobs(tenantCode?) → job list
Returns all jobs for the tenant ordered by created_at descending. DB values are normalized before returning:
assignedTech field is resolved from the tenant’s branding defaults (short company name) rather than a separate user join — it is a display label, not a UUID reference.
createJob(tenantCode, jobData)
Requires the jobs.create action permission (enforced via requireAction). The sequential JOB-YYYY-NNN code is auto-generated from a COUNT query on the tenant’s existing jobs.
"ALTA" → "HIGH", "BAJA" → "LOW", anything else → "MEDIUM".
The job is always created with status: "PENDIENTE". The created_by and assigned_user_id fields are both resolved to the tenant owner user.
Dashboard integration
Jobs feed into two role dashboards: operaciones (DIRECTOR_OPERACIONES, JEFE_PROYECTOS):
OTs Activas— count ofPENDIENTE | EN_EJECUCION | EN_PROGRESOOTs Vencidas— count whereplanned_end_date < todayand not completed/cancelledVencen esta semana— count whereplanned_end_datefalls within the next 7 daysOTs Completadas— count ofCOMPLETADA
TECNICO_CAMPO, JEFE_MANTENIMIENTO):
OTs Activas— same active countOTs Vencidas— overdue countVencen Hoy— count whereplanned_end_date = todayPrioridad Alta— count of active jobs withpriority = "HIGH"