Overview
Custody Chains document the collection, transportation, and disposal of wastewater and waste materials from client sites. Each chain records volumes, types of waste, responsible parties, and maintains a complete audit trail for environmental compliance.CustodyChain Model
Core Purpose
A custody chain tracks a single waste collection event, documenting:- What was collected (waste types and volumes)
- Who collected it (technical staff and driver)
- When it was collected (date and time)
- Where it came from (location and contact)
- How it was transported (vehicle and equipment)
Consecutive Numbering
Custody chains use global sequential numbering:The consecutive number is unique across all custody chains and never resets. It serves as the primary document identifier.
Waste Types and Volumes
Waste Type Flags
Track specific waste types collected:Black Water
black_water = BooleanField()Sewage from toiletsGrey Water
grey_water = BooleanField()Wastewater from sinks/showersClean Water
clean_water = BooleanField()Potable or clean waterActivated Sludge
activated_sludge = BooleanField()Biological treatment sludgeTreated Wastewater
treated_wastewater = BooleanField()Processed wastewaterOrganic Grease
organic_grease = BooleanField()Grease trap wasteVolume Measurements
Record collected volumes in multiple units:- 1 barrel = 42 gallons
- 1 cubic meter = 264.172 gallons
- 1 cubic meter = 6.289 barrels
Responsibility Tracking
Time and Duration
Client Contact Person
Document the on-site contact who authorized the collection:Driver/Transporter
Record the person responsible for transportation:Logistics Flag
Indicate whether logistics services were provided:- SI: Logistics services included (may add cost)
- NO: No logistics services
- NA: Not applicable for this operation
Custody Chain Details
ChainCustodyDetail Model
Each custody chain can reference multiple equipment items:Purpose
Detail records link the custody chain to specific equipment that was serviced:- Identify which tanks were emptied
- Track which bathrooms were serviced
- Document equipment involved in collection
Custody Chain Lifecycle
DRAFT
Initial state. Custody chain is being prepared:
- Record activity date, location, and time
- Assign technical staff and vehicle
- Add equipment details
- Record waste types and volumes
CLOSE
Collection complete and documented:
- Both contact and driver signatures obtained
- All volumes verified
- Equipment list finalized
- Ready for inclusion in work order
Closed custody chains cannot be deleted or modified. This ensures environmental compliance audit trails remain intact.
Document Attachment
Attach the signed custody chain PDF:Code Examples
Creating a Custody Chain
Adding Equipment Details
Closing a Custody Chain
Deletion Protection
Querying Custody Chains
Environmental Compliance
Required Documentation
For regulatory compliance, custody chains must include:Waste Classification
Waste Classification
- Check appropriate waste type flags
- Document any hazardous materials
- Record proper handling procedures
Volume Verification
Volume Verification
- Measure volumes accurately
- Record in all three units (gallons, barrels, cubic meters)
- Verify totals match vehicle capacity
Chain of Custody
Chain of Custody
- Technical staff signature (via technical assignment)
- Client contact signature (date_contact)
- Driver signature (driver_date)
- Complete time records
Transportation Records
Transportation Records
- Vehicle identification (license plate)
- Driver credentials (DNI)
- Route and location documentation
Best Practices
Before Collection
Before Collection
- Create custody chain in DRAFT status
- Assign qualified technical staff
- Verify vehicle certifications are current
- Confirm equipment list with client
During Collection
During Collection
- Record accurate start and end times
- Measure volumes carefully
- Photograph waste sources if needed
- Obtain client signature before departing
After Collection
After Collection
- Update custody chain with final volumes
- Add driver signature
- Change status to CLOSE
- Upload signed custody chain PDF
- Link to work order for billing
Record Retention
Record Retention
- Never delete closed custody chains
- Keep PDF documents for 7+ years
- Archive in compliance with regulations
- Maintain audit trail for inspections
Related Features
Work Orders
Include custody chains in billing work orders
Equipment
Track equipment serviced during collection
Reports
Generate custody chain PDFs and compliance reports
Projects
Link custody chains to project contracts