SOARR / inventory-integrationDocumentation
integration-guideSOARR Inventory SPA
Review copy for Chris. Proposed URL-routing guidance in section 4. This page is separate from the current developer guide.

DEVELOPER REFERENCE

Add SOARR inventory to your website.

Place the dealership’s supplied embed on a test page. Share the URL with SOARR so we can check the layout and configuration before launch.

Your website provides the surrounding page. SOARR provides the configured inventory application, including inventory listings and vehicle detail pages.

1. Add the inventory embed

Website developer
  1. Request the dealership’s integration snippet from SOARR.
  2. Add it to the content area where inventory should appear on a test page.
  3. Send the test-page URL and any design references to SOARR.

Use the complete HTTPS script URL provided by SOARR for your dealership. This fills in the example below; it does not create or activate an integration.

Paste your supplied URL to prepare the embed code.

HTML · your supplied integration script
<div id="invapp"></div>
<script src="SOARR_PROVIDED_SCRIPT_URL"></script>

The example shows the basic structure. Replace SOARR_PROVIDED_SCRIPT_URL with the complete URL SOARR supplies. Script paths and filenames vary by dealership; do not construct a URL from the dealership name.

Use the supplied snippet as provided. Integration scripts can use different placement and loading attributes. Keep the supplied container ID, attributes and script settings; ask SOARR before changing them.

Keep your permanent website content outside #invapp, which is the inventory application’s container.

2. Who handles what

TaskWebsite developerSOARR
Initial installationAdd the supplied snippet and share a test URL.Supply the dealership-specific script and configuration.
Page designBuild the header, footer, surrounding content and site CSS.Coordinate inventory styling and template adjustments.
Filtered inventory pagesUse parameters or route names confirmed for the integration.Confirm supported parameters, values, routes and custom mappings.
Clean URLsConfigure the host/CDN rewrite and update website links.Configure the SPA routing mode, root path and route patterns.
Custom behaviorProvide requirements and implement agreed website-side changes.Confirm the approach and configure or develop integration-specific behavior.

3. Create filtered inventory pages

Developer-enabled after SOARR confirms configuration

Configured integrations can use data-params on the inventory container to prefilter inventory. The following is an example of a used-Peterbilt page; confirm these parameters are supported by the dealership’s script before using it.

Example · only with SOARR-confirmed parameters
<div id="invapp" data-params="{designation: 1, make: 'Peterbilt'}"></div>
<script src="SOARR_PROVIDED_SCRIPT_URL"></script>
ParameterDocumented useConfirm with SOARR
designation0 = new; 1 = used.How the dealership’s inventory is classified.
make, model, yearPrefilter by vehicle make, model or year.The accepted values and desired matching behavior.
vehtypePrefilter by a SOARR vehicle-type ID.The correct ID for the requested category.
dealershipidLimit inventory to a dealership/location in a configured integration.The appropriate SOARR ID and available inventory scope.
pagesizeSet the number of results per page.Support and intended layout in the integration.

Use only the parameters and values SOARR confirms. These examples do not define every available option or guarantee support across all script versions.

Named routes are configured, not universal features. A data-route value refers to a route set up for that integration. Custom inventory groups, such as a coming-soon list based on a dealership’s customizable field, require SOARR configuration. Adding a route name does not create the underlying filter.

Confirm how combined filters behave in your integration. Discuss requirements for OR logic or more complex grouping with SOARR.

4. Coordinate clean URLs

Website developer + SOARR

The SPA supports hash routing and clean paths using the History API. Use the routing mode configured for your integration.

URL examples · same vehicle, different routing
Hash:  /inventory/#/specs/123456/example-truck
Clean: /inventory/specs/123456/example-truck

Hash routing

The browser requests /inventory/. SOARR reads the route after # and displays the vehicle. No additional server rewrite is needed for the fragment.

Everything after # stays in the browser. Your server and Cloudflare never receive it, so a Cloudflare rule cannot match or rewrite that portion of the URL.

Clean paths

Clean paths require configuration on both sides:

  1. SOARR: configure History API routing, the inventory base path, and supported listing and vehicle-detail routes.
  2. Website developer: internally rewrite those routes to the page containing the inventory embed. Return HTTP 200 and keep the requested URL unchanged.
Internal rewrite · example
Requested URL: /inventory/specs/123456/example-truck
Serve content: /inventory/
Browser URL:   /inventory/specs/123456/example-truck

Use a rewrite, not a redirect. Preserve query parameters. Limit the rewrite to agreed application routes; exclude static assets, API requests, and unrelated pages.

Cloudflare

When Cloudflare proxies the website, a URL Rewrite Rule can provide the host-side rewrite to the inventory page. Your website administrator configures the rule for the actual domain and routes; SOARR configures the matching application routing.

If Cloudflare only manages DNS, configure routing at the host. Cloudflare Pages and Workers have their own routing options; a site-wide SPA fallback may serve the wrong page when inventory is only one section of a larger website.

Other platforms

WordPress, IIS, Vercel, and Netlify require platform-specific configuration. Use the routing facilities available in the existing website stack; changing hosting is not a requirement.

WordPress: clean paths require additional integration to render the inventory page at vehicle URLs and handle WordPress redirects and SEO settings. This is not a page-builder setting. Confirm the implementation with SOARR before changing existing links.

Keep existing links until both sides are ready. Removing # from links does not enable clean routing. A server rewrite alone does not change the SPA’s routing mode. If the host cannot provide the required routing, retain hash URLs.

Host-side rewrite examples

Choose the tab for your hosting setup. These are starting examples for Chris to review, not validated SOARR deployment recipes. They cover the illustrated vehicle-detail pattern only; add listing/filter routes only after SOARR confirms them.

Worker script · vehicle-detail routes
// Example: GET/HEAD vehicle-detail routes only.
// Confirm these routes and /inventory/ with SOARR.
export default {
  async fetch(request) {
    const url = new URL(request.url);
    const isDetail = /^\/inventory\/specs\/[0-9]+(?:\/[^/.]+)?\/?$/.test(url.pathname);
    const isRead = ["GET", "HEAD"].includes(request.method);

    if (isRead && isDetail) {
      url.pathname = "/inventory/";
      // url.search is retained; browser URL stays unchanged.
      return fetch(new Request(url.toString(), request));
    }

    return fetch(request);
  }
};

Attach the Worker using a route on the proxied website (for example, www.example.com/inventory/*). This example is for Workers Routes with a working origin, not a standalone Worker Custom Domain. Confirm the base page returns 200 without redirecting. Avoid overlapping rewrite rules.

All examples: SOARR must enable matching History API routing. Use absolute asset paths, check CMS canonical redirects and canonical tags, and test direct links, refresh, and Back/Forward. Rewriting the host request does not enable SPA routing or per-vehicle SEO by itself.

Verify

Open a vehicle URL directly in a new tab. Test refresh, filters, and browser Back/Forward. For clean paths, confirm the document returns HTTP 200 without redirecting to the inventory landing page.

Clean URLs are one part of SEO. Confirm route-specific titles, descriptions, canonical tags, and accessible vehicle content. A clean URL alone does not guarantee indexing.

5. Customize the inventory presentation

SOARR-assisted · advanced development

The basic installation does not require a custom application build. For deeper customization, SOARR can coordinate separate inventory-list and vehicle-detail templates using Handlebars, custom route patterns, route-level SEO settings, and callbacks after startup or route changes.

SOARR can provide the relevant template examples and supported helpers for an agreed implementation. Establish who will edit and host the templates before making changes. Use the configuration supplied for the dealership rather than copying another customer’s initialization file.

The inventory application shares the website’s styling environment. Review layout and CSS interactions on the real test page; send SOARR specific screenshots or design references for adjustments.

For strict Content Security Policy requirements, share the existing policy and browser violations with SOARR so the required resources can be confirmed for the integration.

6. Test before launch

  • Correct dealership inventory and intended filters appear.
  • Listings, photos, vehicle details and pagination work.
  • Mobile layouts and website CSS do not obscure inventory controls.
  • Inquiry forms, phone links and other configured calls to action work.
  • Direct vehicle links, page refresh and browser Back/Forward work.
  • For clean routing, agreed listing and detail URLs load with HTTP 200 and retain the requested address.
  • Page titles, descriptions, canonical tags and inventory links have been reviewed for the agreed setup.
  • SOARR has reviewed the test URL and coordinated any script or configuration changes for launch.
Request integration help →

Include the dealership name, test-page URL, website platform, and the issue or change requested.