layout | title | parent | nav_order | version |
---|---|---|---|---|
default |
Object Schema |
Overview |
2 |
1.0 |
The BoxFresh App is built on a foundation of custom Salesforce objects that model the business domain. The schema is divided into functional groups to organize the different aspects of the business.
Inventory objects manage the materials and supplies used in landscaping services, implementing capacity constraints following Eliyahu Goldratt's Theory of Constraints principles.
This object categorizes materials for budgeting and inventory management purposes.
Key Fields:
Name
: The category name (e.g., "Fertilizers", "Seeds", "Pesticides")Material_Code__c
: Auto Number field for unique category identificationUnit_of_Measure__c
: Default unit of measure for materials in this categoryTotal_SKUs_in_Category__c
: Roll-Up Summary counting the number of SKUs in this category
Relationships:
- Has many
Material_SKU__c
records (Master-Detail) - Referenced by many
Material_Budget__c
records
This is the catalog of unique stock items in the inventory.
Key Fields:
Name
: The SKU identifierDescription__c
: Detailed description of the itemUnit_of_Measure__c
: How the item is measured (e.g., kg, liter, piece)Unit_of_Measure_Quantity__c
: ==The amount of units in a SKU (i.e 10L compost bag = unit of measure; litre, unit of measure quantity: 10, to calculate totals for reporting. different from capacity because units of measurement equal to different capacities, need formula for capacity units....)Unit_Cost__c
: Cost per unitMaterial_SKU_Category__c
: Master-Detail relationship to Material_Category__cCapacity_Units_Per_Unit__c
: How many capacity units each unit of this SKU consumes
Relationships:
- Has many
Material_Stock__c
records - Belongs to one
Material_Category__c
(Master-Detail)
Tracks the quantity of each material batch and its capacity consumption.
Key Fields:
Material_SKU__c
: Lookup to the material catalogueQuantity__c
: The amount availablePurchase_Date__c
: When the stock was acquiredUnits_Consumed__c
: How many capacity units this stock consumes in its containerCapacity_Status__c
: Current status relative to buffer thresholds ==(NOT ADDED TO SF) advise, im not sure this field is relevant here, there is no capacity threshold for individual stocks, only the total stock records held in a inventory record are important==
Relationships:
- Belongs to one
Material_SKU__c
- Belongs in one
Inventory__c
Manages storage locations and capacity constraints, representing physical containers.
Key Fields:
Name
: Identifier for the inventory locationInventory_ID__c
: Auto Number field for easy identificationLocation__c
: Physical locationCapacity_Units__c
: Maximum capacity units available in this containerAvailable_Units__c
: Formula field showing remaining capacityResource_Asset__c
: Lookup to associated resource assetBuffer_Status__c
: Current buffer zone status (Below Buffer/Within Buffer/Above Buffer)Is_Constraint__c
: Boolean indicating if this container is a current system constraint
Relationships:
- Has many
Material_Stock__c
records - Belongs to one
Resource_Asset__c
- Referenced by many
Assignment__c
records
Tracks budgeted material quantities and costs at the category level.
Key Fields:
Name
: Budget identifierMaterial_Category__c
: Lookup to the material categoryBudgeted_Quantity__c
: Planned quantity for the categoryBudgeted_Cost__c
: Planned costDate_Range_Start__c
: Budget period startDate_Range_End__c
: Budget period end
Relationships:
- Belongs to one
Material_Category__c
- Can be associated with contracts or projects as needed
These objects manage the staff, equipment, and other resources needed for service delivery.
Represents a person who performs services.
Key Fields:
Name
: Resource identifierType__c
: Type of resource (Staff, Contractor)Skill_Set__c
: Multi-select picklist of skillsAvailability_Start__c
: Daily availability start timeAvailability_End__c
: Daily availability end time
Relationships:
- Has many
Assignment__c
records - Belongs to many
Resource_Unit__c
records==this relationship could be made for historical history of assignments completed. if that makes sense...
Represents equipment, vehicles, or other physical assets.
Key Fields:
Name
: Asset identifierType__c
: Type of assetHas_Storage__c
: Whether the asset can store inventoryStatus__c
: Current status (Available, In Use, Maintenance)
Relationships:
- Has one
Inventory__c
(ifHas_Storage__c
is true) - Belongs to many
Resource_Unit__c
records
Groups resources and assets into functional units.
Key Fields:
Name
: Unit identifierCapacity__c
: Maximum number of assignments per day
Relationships:
- Has many
Resource__c
records - Has many
Resource_Asset__c
records - Has many
Assignment__c
records
These objects manage customer agreements and service execution.
Represents the master agreement with a customer.
Key Fields:
Name
: Contract identifierAccount__c
: Customer accountStart_Date__c
: Contract start dateEnd_Date__c
: Contract end dateStatus__c
: Current contract status
Relationships:
- Belongs to one
Account
(standard object) - Has many
Order__c
records - Has many
Service_Agreement__c
records - Has many
Assignment__c
records (Master-Detail)
Represents a specific service order under a contract.
Key Fields:
Core_Contract__c
: Parent contractService_Date__c
: Scheduled service dateStatus__c
: Current order statusTotal_Amount__c
: Order total
Relationships:
- Belongs to one
Core_Contract__c
- Has many
Assignment__c
records
Details specific terms and conditions of the contract.
Key Fields:
Core_Contract__c
: Parent contractType__c
: Type of agreementTerms__c
: Detailed terms
Relationships:
- Belongs to one
Core_Contract__c
Key junction object linking contracts, resources, and inventory.
Key Fields:
Order__c
: Related service orderResource_Unit__c
: Assigned resource unitStart_Time__c
: Assignment start timeEnd_Time__c
: Assignment end timeStatus__c
: Current assignment statusAssigned_Inventory__c
: Lookup to inventory containerTotal_Capacity_Required__c
: Total capacity units neededCapacity_Allocated__c
: Capacity units successfully allocated
Relationships:
- Belongs to one
Order__c
- Belongs to one
Resource_Unit__c
- Belongs to one
Inventory__c
(Assigned_Inventory__c) - Child of
Core_Contract__c
(Master-Detail) - Has many
Schedule__c
records
These objects manage the service locations and properties.
Represents a physical location where services are performed.
Key Fields:
Name
: Property identifierAccount__c
: Customer accountAddress__c
: Physical addressSize__c
: Property sizeType__c
: Property type
Relationships:
- Belongs to one
Account
(standard object) - Has many
Service_Location__c
records - Has many
Core_Contract__c
records
Represents specific areas within a property.
Key Fields:
Property__c
: Parent propertyName
: Location identifierType__c
: Location typeSize__c
: Location size
Relationships:
- Belongs to one
Property__c
These objects manage the execution of services.
Represents a specific scheduled service execution.
Key Fields:
Assignment__c
: Parent assignmentScheduled_Date__c
: When the service is scheduledStatus__c
: Current schedule statusDuration__c
: Expected durationNotes__c
: Schedule notes
Relationships:
- Belongs to one
Assignment__c
- Has many
Material_Usage__c
records
Tracks materials used during service execution.
Key Fields:
Schedule__c
: Parent scheduleMaterial_Stock__c
: Source material stockQuantity_Used__c
: Amount usedUsage_Date__c
: When the material was used
Relationships:
- Belongs to one
Schedule__c
- Belongs to one
Material_Stock__c
This content has been migrated as part of the Documentation Consolidation Initiative (April 3-11, 2025) from its original location at core_abstraction/schema.md
.