Templates Resources
Majority of Numsolar information is available in the templates.
What is a resource?
Resource is an object or a collection of objects that are available in the Template.
Following resources are available:
How to access the resource from your template?
You specify a resources access URL that indicates which data to dynamically insert into the template.
- To access value you reference resources name and than attribute name
- If the attribute is a collection, you can indicate which element of the collection to take like collection.0.name
- The same resource access URL is used with the 'IF' attributes
<numsolar field="prospect.first-name"></numsolar>
<numsolar field="monthly_simulation.chh.0"></numsolar>
How can I use resources with 'IF' attribute?
You can compare resources with the comparison operators: =, !=, >, <
- You can have if attribute without a comparison operator to check if the resource is present
- With 2 resources you can compare them between each other
<numsolar if="prospect.first-name"></numsolar>
<numsolar if="monthly_simulation.chh.0>monthly_simulation.chh.1"></numsolar>
Organisation
- Your organisation registered in Numsolar.
<h1 class="text-3xl">
<numsolar field="organisation.title"></numsolar>
</h1>
<numsolar class="border rounded-lg w-32 h-32" img="organisation.logo_s3_path"></numsolar>
Manager
- Manager associated to the prospect
<span class="text-lg">
<numsolar field="manager.first_name" if="manager.first_name"></numsolar>
<numsolar field="manager.last_name" if="manager.last_name"></numsolar>
</span>
Prospect
- Prospect is your client
<span class="text-lg">
<numsolar field="prospect.first_name" if="prospect.first_name"></numsolar>
<numsolar field="prospect.last_name" if="prospect.last_name"></numsolar>
</span>
Packages
- Package that was used to create an offer for the client.
<h2 class="text-2xl"><numsolar field="package.title" if="package.title"></numsolar></h2>
<p if="package.description">
<numsolar field="package.description"></numsolar>
</p>
Offer
- Package that was used to create an offer for the client.
- title : string
- description : string
- number : string
- offer_date : date
- offer_due : date
- status : Enum<>
- grand_total : decimal
- currency : string
- subtotals : Subtotal
- adjustments : Array<Adjustments>
- configuration_lines : Array<ConfigurationLine>
- object_id : string
- object_type : Enum<equipment|category>
- object_category : Enum<Equipment categories>, Enum<Service categories>
- title : string
- optional : boolean
- enabled : boolean
The configuration lines can be turned off both by the manager and the prospect
- cost_co2_kg : kg
- cost_hours : hours
- weight_kg : kg
- cost : decimal
- vat : decimal
- visible_total : decimal
- visible_cost : decimal
- adjustments : Array<Adjustment>
<h2 class="text-2xl"><numsolar field="offer.title" if="offer.title"></numsolar></h2>
<table>
<tr>
<th>Line</th>
<th>Cost</th>
</tr>
<numsolar each="offer.configuration_lines">
<tr>
<td><numsolar field="item.title"></numsolar></td>
<td><numsolar field="item.visible_cost" format="money"></numsolar></td>
</tr>
</numsolar>
</table>
<h3 class="text-3xl"><numsolar field="offer.subtotals.grand_total" if="offer.subtotals.grand_total" format="money"></numsolar></h3>
Simulation
- Manager associated to the prospect
- weather : Enum<historic|clear|clouds|generic>
- installation_type : grid_tied|solar_to_battery_to_grid|solar_to_battery_off_grid>
- installation_year : integer
- start_date : date
- end_date : date
- view : [monthly|yearly]
For monthly simulations there are 12 values in the Array<> fields for yearly: 50
- prod_after_loss : Array<watts>
Total generation by your solar panels after shade and temperature loss
- prod_loss_shade : Array<watts>
Total generation loss caused by the shadows
- prod_loss_temp : Array<watts>
Total generation loss from the temperature degradation
- prod_loss : Array<watts>
Total generation loss
- c_null_h : Array<watts>
Household consumption that was needed but not provided (for the off-grid setups)
- c_null_c : Array<watts>
Electric car charging that was needed but not provided (for the off-grid setups)
- c_null_b : Array<watts>
Battery charging that was needed but not provided (for the off-grid setups)
- cs_null : Array<watts>
Solar generation that was provided but not used by neither batter, household nor the car charging (for the off-grid setups)
- b : Array<watts>
Battery charge state (useful for sub-hourly simulations)
- chh : Array<watts>
Electricity requirements of the household
- chc : Array<watts>
Electricity requirements for the electric car charging
- csh : Array<watts>
Solar generation consumed by the household
- csb : Array<watts>
Solar generation consumed by the battery
- csc : Array<watts>
Solar generation consumed to charge the electric car
- csg : Array<watts>
Solar generation pushed into the grid
- cgh : Array<watts>
Grid electricity consumed by the household
- cgb : Array<watts>
Grid electricity consumed by the battery
- cgc : Array<watts>
Grid electricity consumed to charge the electric car
- cbh : Array<watts>
Battery electricity consumed by the household
- cbc : Array<watts>
Battery electricity consumed to charge the electric car
- cbg : Array<watts>
Battery electricity consumed by the grid
- cost_interest : Array<decimal>
Payments to cover the interest (when payment method is 'loan')
- cost_installment : Array<decimal>
Payments to cover the installment (when payment method is 'loan' or 'leasing')
- cost_flat : Array<decimal>
Flat monthly/yearly payments to the utilities operators
- cost_chh : Array<decimal>
Costs associated to household needs (as if the solar, battery are not used)
- cost_chc : Array<decimal>
Costs associated to charging the electric car (as if the solar, battery are not used)
- cost_cgh : Array<decimal>
Costs of grid by household consumption
- cost_cgb : Array<decimal>
Costs of grid by battery consumption
- cost_cgc : Array<decimal>
Costs of grid by electric car consumption
- cost_csg : Array<decimal>
Costs of selling solar generated electricity to the grid
- cost_csh : Array<decimal>
Costs of direct solar to household consumption
- cost_csb : Array<decimal>
Costs of solar to battery charging
- cost_csc : Array<decimal>
Costs of solar to electric car charging
- cost_cbg : Array<decimal>
Costs of selling battery electricity to the grid
- cost_cs_null : Array<decimal>
Costs of solar generated electricity that was lost
<span class="text-lg">
<numsolar field="mothly_simulation.chh.0" if="monthly_simulation.chh.0"></numsolar>
<numsolar field="yearly_simulation.chh.0" if="yearly_simulation.chh.0"></numsolar>
</span>
Attachments
- Attachments that are associated to the package or the house
<span class="text-lg">
<numsolar img="attachments.package.0" if="attachments.package.0"></numsolar>
<numsolar img="attachments.house.0" if="attachments.house.0"></numsolar>
</span>
Summary
- Summary of installation, offer and the simulation
- start_date : string
- end_date : string
- view : Enum<monthly|yearly>
- currency : string
- utility_costs_without_solar : Array<decimal>
- total_installation_cost : decimal
- country_name : string
- profitability_achieved : boolean
- utility_costs_with_solar : Array<decimal>
- generation_to_consumption_rate : decimal
- roi_achieved : boolean
- utility_savings : Array<decimal>
- co2_roi_year : decimal
- loan : decimal
- roi_year : decimal
- downpayment : decimal
- co2_kg_per_kwh : decimal
- co2_as_car_km : decimal
- co2_as_person : stridecimalng
- co2_as_tree_per_year : decimal
- co2_as_tree_lifetime : decimal
- co2_as_airplane_km : decimal
- co2_as_airplane_hour : decimal
- co2_roi_achieved : boolean
- cgx : Array<decimal>
- cxg : Array<decimal>
- balances : Array<decimal>
- balances_without_solar : Array<decimal>
- balances_with_solar : Array<decimal>
- co2_offsets : Array<decimal
- total_score : decimal
- installation_waiting_time_in_weeks : integer
- profitability_year : decimal
- battery_kwh : decimal
- battery_title : string
- batteries_count : decimal
- solar_panels_count : decimal
- solar_panel_title : string
- solar_panel_total_kw : decimal
- inverter_title : string
- inverters_count : decimal
- inverters_kw : decimal
- car_charger_title : string
- car_chargers_count : decimal
- smart_system_title : string
- smart_systems_count : decimal
- financing_method_title : string
- financing_method_type : string
- financing_method_duration_years : decimal
- financing_method_duration_months : integer
- adults_in_household : integer
- house_ampers : decimal
- cs_null_loss_factor : decimal
- shade_loss_factor : decimal
- temp_loss_factor : decimal
- compound_year_efficiency : decimal
<span class="text-lg">
<numsolar field="summary.battery_title" if="summary.batteries_count>0"></numsolar>
</span>