This function generates a pre-lease report using the reports
and queue
Entrata endpoints with their corresponding methods and input filter parameters.
The response's report data will vary depending on the provided filter parameters and should return a list with the extracted, un-processed report data for the summary and details report "subtotals".
Usage
entrata_pre_lease_report(
property_ids = get_property_ids_filter_param(),
leasing_period_start_date = get_pre_lease_period_start_date(),
leasing_period_type = c("today", "date"),
summarize_by = c("property", "unit_type", "floorplan_name", "do_not_summarize"),
group_by = c("do_not_group", "unit_type", "floorplan_name", "lease_term"),
consider_pre_leased_on = c("33", "32", "34", "41", "42", "43", "44"),
charge_code_detail = c("0", "1"),
space_options = c("do_not_show", "show_preferred", "show_actual"),
additional_units_shown = c("available", "excluded"),
combine_unit_spaces_with_same_lease = c("0", "1"),
consolidate_by = c("no_consolidation", "consolidate_all_properties",
"consolidate_by_property_groups"),
arrange_by_property = c("0", "1"),
subtotals = list("summary", "details"),
yoy = c("1", "0"),
...
)
Arguments
- property_ids
A vector of property IDs to include in the report. Defaults to
get_property_ids_filter_param()
, which returns all available property IDs. The actual values passed to the request need to be unnamed and flattened to a character vector or single level list.- leasing_period_start_date
The start date of the leasing period. Defaults to the result of
get_pre_lease_period_start_date()
which returns the date for September 1st of either the current year or the next year, depending on the current date. The date should be formatted as "m/d/Y".- leasing_period_type
The type of leasing period. Defaults to "today". Can be one of "today" or "date".
- summarize_by
The method of summarizing the report. Defaults to "property". Can be one of "property", "unit_type", "floorplan_name", or "do_not_summarize".
- group_by
The method of grouping the report. Defaults to "do_not_group". Can be one of "do_not_group", "unit_type", "floorplan_name", or "lease_term".
- consider_pre_leased_on
The method of considering pre-leased units. Defaults to "33". Can be one of "32", "33", "34", "41", "42", "43", or "44", which (I believe) represent the various leasing occupancy types.
- charge_code_detail
The method of showing charge code details. Defaults to "0". If set to "1", the report will show charge code details.
- space_options
The method of showing space options. Defaults to "do_not_show". Can be one of "do_not_show", "show_preferred", or "show_actual".
- additional_units_shown
The method of showing additional units. Defaults to "available". Can be one of "available" or "excluded".
- combine_unit_spaces_with_same_lease
The method of combining unit spaces with the same lease. Defaults to "0". If set to "1", the report will combine unit spaces with the same lease.
- consolidate_by
The method of consolidating the report. Defaults to "no_consolidation". Can be one of "no_consolidation", "consolidate_all_properties", or "consolidate_by_property_groups".
- arrange_by_property
The method of arranging the report by property. Defaults to "0". If set to "1", the report will be arranged by property.
- subtotals
A list of subtotals to include in the report. Defaults to "summary" and "details". Can be one or both of "summary" and "details".
- yoy
The method of showing year-over-year data. Defaults to "1". If set to "0", the report will not show year-over-year data.
- ...
Additional parameters for the API request passed on to the downstream
entrata()
function.
Details
The function performs the following steps:
Get the latest report version for the "pre_lease" report using the
get_latest_report_version()
function.Prepare the property IDs, leasing period start date, and period method parameters.
Validate the input parameters for
summarize_by
,group_by
,consider_pre_leased_on
,charge_code_detail
,space_options
,additional_units_shown
,combine_unit_spaces_with_same_lease
,consolidate_by
,arrange_by_property
,yoy
, andsubtotals
.Prepare the report request method parameters.
Perform a request to get the queue ID.
Extract the queue ID and display an alert message with the queue ID.
Prepare a request to get the report data.
Perform the request iteratively, throttling the retry until an actual response with data is received.
Extract and parse the content from the response, separating "summary" and "details" data as necessary.
Return a list with the extracted, un-processed report data for further downstream processing or analysis.
See also
get_latest_report_version()
, get_property_ids_filter_param()
, get_pre_lease_period_start_date()