Entrata Integration
Overview
Entrata is a property management system used for US properties. The integration handles:
- Tour (viewing) scheduling and lead creation
- Available tour time slot retrieval
- Property data synchronization
Files
| File | Purpose |
|---|---|
api/propertyFeed/utils/entrata/leads.php | Tour time slots and lead submission |
api/propertyFeed/utils/entrata/validation.php | Input validation |
api/propertyFeed/utils/entrata/constants.php | Configuration constants |
api/external/entrata/index.php | Entrata webhook/callback handler |
api/getEntrataTourTimes.php | Endpoint to fetch tour times |
Authentication
Entrata uses OAuth2 with client credentials:
ENTRATA_CLIENT_ID # e.g., "873cf1d6fadf091f38d4.myhousr"
ENTRATA_CLIENT_SECRET # Stored in AWS Secrets ManagerDifferent client IDs are used for sandbox vs production.
Tour Time Slots
Fetching Available Times
The leads.php file provides a function to retrieve available tour slots for a property:
function getTourTimeSlots($subdomain, $accessToken, $propertyId, $requestedMonth, $tourType = null)Parameters:
$subdomain- Client-specific Entrata subdomain$accessToken- OAuth bearer token$propertyId- Entrata property ID$requestedMonth- Format"MM-YYYY"$tourType-AGENT_GUIDED,SELF_GUIDED, orVIRTUAL_GUIDED(defaults toAGENT_GUIDED)
Returns an associative array with dates as keys and arrays of start times as values, or TOURS_NOT_SUPPORTED for properties without tour scheduling (error 314).
Timezone Handling
Entrata returns times in the property’s local timezone. The integration converts all times to America/Chicago:
function convertToChicagoTime($timeString)Supports MDT/MST, CDT/CST, EDT/EST, PDT/PST timezone abbreviations.
Lead Submission
When a US user requests a viewing for an Entrata-managed property:
requestViewing.phpchecks if the house is an Entrata property- Calls
sendLeadToEntrataFromViewing()to submit the lead - If successful, the viewing request is created locally with
external_id(Entrata lead ID) andexternal_type = "ENTRATA" - The viewing status is set to
ACCEPTED(since Entrata handles the confirmation)
Nginx Routing
Entrata webhooks have special routing in deploy/deploy.conf:
location /api/external/entrata/ {
try_files $uri $uri/ /api/external/entrata/index.php$is_args$args;
}This routes all Entrata callbacks to index.php which acts as a controller.
Property Feed
Entrata properties are also synced via the property feed system. The api/propertyFeed/entrata/ directory (referenced within propertyFeed/utils/entrata/) handles property data synchronization.
Demo Environment
In the demo environment (APP_ENV === 'demo'), Entrata lead submission is bypassed:
if ($_ENV['APP_ENV'] === 'demo') {
$entrataLeadResult = true;
}