Skip to main content

AccessAudi Ordering

How an order is placed on AccessAudi, the Audi US OMS. The ingestion of AccessAudi data is covered by accessaudi Source. The implementation's choices are in Ordering Decisions.

Everything here was observed in recorded dealer sessions, except the items under Open questions and content marked dealer-reported. The capture record is in ppm-ordering-services under docs/oems/audi/.

Transport​

Every call is an HTTP POST to /lr/group/audi-us/home with the call name in p_p_resource_id, a form-urlencoded body, and a JSON response. Three cookies authenticate a session: PD-H-SESSION-ID, EncryptCookie, and AMWEBJCT!%2Flr!JSESSIONID. A CSRF token (Liferay.authToken) is fetched once per session from the home-page HTML and sent as X-CSRF-TOKEN on every POST.

An expired session often returns HTTP 200 with SAML login HTML instead of JSON. Expiry is detected by checking the response body for pkmslogin.lua, saml20/login, or SAMLRequest.

A session has two parts that expire separately. PD-H-SESSION-ID is the session of the WebSEAL reverse proxy, and AMWEBJCT!%2Flr!JSESSIONID is the session of Liferay, the application behind WebSEAL. Liferay ends an idle session while the WebSEAL session is still live. A request for the home page then returns HTTP 302 to /lr/c/portal/login, and a browser signs in again without a password:

  1. /lr/c/portal/login returns a form that posts a SAMLRequest to /audijct/sps/audijct/saml20/login. The page submits the form on load.
  2. The SAML identity provider under /audijct/sps/ accepts the live WebSEAL session and redirects to http://www.accessaudi.com/audijct/sps/auth. The browser upgrades the redirect to https.
  3. /audijct/sps/auth returns a form that posts a SAMLResponse to /lr/c/portal/saml/acs.
  4. Liferay sets a new AMWEBJCT!%2Flr!JSESSIONID and redirects, through /lr/c/portal/saml/auth_redirect, to the home page.

AccessAudiClient takes the same steps before it reads the CSRF token, and keeps every cookie that the responses set. When the WebSEAL session has also expired, the identity provider redirects to the WebSEAL login page instead. The client then raises AccessAudiAuthError, naming the page where the steps ended.

The order flow​

A stock order (order type 2, SHIP) is placed with this sequence:

getModels(carline, modelYear)
getExteriorColors(carline, modelYear, model)
getOptions(carline, modelYear, model) options + their rules
getInteriorColors(carline, modelYear, model, exterior)
getAdditionalCharges(modelYear, model, exterior, interior, options)

validateRemainingQuantity(carline, modelYear, quantity)
addToPendingSubmission(carline, year, model, exterior, interior,
options=<CSV>, ordertype, quantity, comments, msrp)
validateRemainingQuantity(..., requestKey=pending)
submitPendingSubmissions(idArr[]=<pending id>...)
  • addToPendingSubmission creates a pending submission with a numeric id.
  • submitPendingSubmissions submits it. The order receives its commission number and orderStatus 10, and the ordering flow ends there.
  • Transmission to the factory happens later, outside the dealer session. Until then the order can still be modified through updateVehicleDetails. Dealers report that it is locked once transmitted.

Notable behavior:

  • A pending submission consumes allocation before any submit.
  • validateRemainingQuantity checks quantity alone, against the carline's allocation remainder. The frontend sends it a second time immediately before the submit, with requestKey=pending scoping the remainder to the pending submissions. When the quantity exceeds the remainder, the call returns status success and data false: {"remainingQuantity": 0, "data": false, "status": "success"}.
  • No idempotency key exists on any of these calls, so a retry is indistinguishable from a second order. A submit whose outcome is unknown is reconciled by re-reading the pending submissions (ajaxGetPendingSubmissions).
  • The pending submission has a free-text comments field of 1,000 characters. A run writes AutoIntel #<number> into it. When this text appears in the comment, that means the order was placed by the PPM ordering runner. The number identifies the order after its pending id is gone. It counts up per dealer from 0001 with no ceiling, padded to at least four digits. Onboarding asks dealerships to append to this comment rather than replace it.
  • ajaxGetPendingSubmissions(carline, modelYear) lists the pending submissions in the same format addToPendingSubmission echoes, comments and msrp included.
  • deletePendingSubmissions(idArr[]=<pending id>...) removes pending submissions in bulk and returns the allocation they consumed. Its response lists each deleted row as the OMS stores it: flat codes, the login that added it, orderStatus (null while unsubmitted), and a configurationSummary line. The frontend asks for confirmation in a dialog before the call. The OMS itself asks for none.
  • ajaxGetPendingSubmissions lists only pending submissions, and deletePendingSubmissions removes only pending submissions. Neither call lists or removes a sold order.

Order type 1 (SOLD) adds a customer order to the sold order waitlist. The sold orders on the waitlist can exceed the allocation. A run never places a sold order.

Option rules​

getOptions also returns modelOptionRulesBean, the option compatibility rules for its (carline, modelYear, model). Rules attach at three levels: the model, each exterior or interior color, and each option. Each level lists required options and mutually exclusive options.

The OMS enforces these rules in its frontend. It has no validation call, and it accepted a pending submission that violated them.

The frontend also auto-selects: when a required option group is unsatisfied and a member is available, it selects that member without notifying the dealer.

An option rule with soldOrder: true allows the option only on a sold order.

Interior substitutions​

AccessAudi can order an interior under a code that the public inventory does not report. A 2027 Q9 (G9BAYA) with the Luxury package (PBE) and Stone Beige seats is ordered as interior XS, Stone Beige with the package's Dinamica headliner, because PBE excludes interior KS. OneGraph reports such a car's interior as KS, so a candidate built from it has PBE with KS.

INTERIOR_SUBSTITUTIONS in ai_ordering.oem.audi.validator lists each such case: a model, an interior, the option that changes it, and the interior AccessAudi orders instead. The validator applies an entry when it maps a candidate to a build, and only when AccessAudi offers the substitute interior with the build's exterior.

Allocation​

Allocation is listed per carline and split into restrictions, one per model code. Each restriction caps the units of its model code, and units do not move between the model codes of a carline. For example, a dealer's 7 units of the 2027 Q7 are 6 Q7 (G8BAYA) and 1 SQ7 (G8BSVA). A restriction's filter names its model code, such as SALE_MDL_CDE = 'G8BAYA'. Each carline also lists a "NoRestriction" entry without a filter, for units that any model of the carline may use.

A submit requires an active allocation period and remaining quantity for the carline and restriction. Pending submissions from every session count against that remaining quantity, so the frontend re-reads it immediately before submitting, and a client must do the same.

addToPendingSubmission refuses a stock order that would exceed the carline's allocation. It responds with HTTP 200, status error, and a message such as this one for the 2027 Q7:

{"message": "Adding this pending submission will exceed models \"MY27 Q7\" total allowed allocation.", "status": "error"}

An allocation's period_code is a year and month followed by a letter, such as 202611A. The year and month are the production month of the allocated units. The letter tells apart two allocations for the same month, such as 202611A and 202611B.

Audi assigns every allocated unit to the dealer, however many configurations the dealer submits. For an unconfigured unit, Audi decides the configuration to produce. This is dealer-reported and has not been observed in a capture. See Ordering Decisions.

checkSendToFactoryWebServiceFlag reports the downstream factory service's availability.

Pricing​

The configurator page computes a build's MSRP and sends it as the msrp of addToPendingSubmission. The MSRP is the sum of:

  • the msrp of the model, the exterior, the interior and each selected option, from the configurator reads
  • the msrp that getAdditionalCharges returns for the configured build

A carline whose prices are not loaded yet returns msrp 0 for every item.

Identifiers​

FieldMeaning
commissionId + commissionNumYearsubmitted-order key (two parameters)
pending-submission idnumeric surrogate, meaningful until the submit
updateIdoptimistic-concurrency token on updateVehicleDetails
restrictionIdtrim-level allocation-restriction key

The OMS commission number (AB1234 format) is a different identifier from the factory commission number (numeric) and is reissued when an order is traded between dealers. The mirror maps it to order_number; see accessaudi Source.

Open questions​

  • Whether submitPendingSubmissions checks option rules. A dealer test settles it: submit one pending submission that violates a rule and record the response.
  • Whether a submitted row leaves the pending submissions.