Repository navigation
Add CRM integrations with client prefill and saved screening results - #546
Open
prestoncabe wants to merge 10 commits into
Open
prestoncabe wants to merge 10 commits into
prestoncabe wants to merge 10 commits into
Conversation
The demo server was a global Playwright webServer, so every project, including the emulator-backed chromium suite, needed port 4174 free. The CRM spec now launches it on a free port itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The host adapter required the path to be exactly /screener/{id}, so a
frontend deployed under a prefix such as /bdt was rejected as invalid.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CRM bridge and array field normalization each kept their own list of prototype keys. The host adapter keeps its own ID helper on purpose, since CRMs copy that file as a standalone module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
form-js imports a null or omitted answer as its empty value, false for checkboxes and '' for text fields. The connected screener then evaluated and reported those as real answers, so a CRM could save an explicit No. Those answers now stay null until the user changes the field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The screener sent ready once and waited indefinitely, so a reload after the host disposed its connection, a host that started listening late, or a redirect to another origin left staff on the waiting message. The screener now repeats ready until initialized and, after 10 seconds, shows the form unconnected with a notice. The host adapter ignores repeated ready messages for an initialized session and reports CONNECTION_TIMEOUT and ORIGIN_MISMATCH through onError. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
If fetching the published screener failed, the bridge had already sent initialized and the host kept waiting for results that never came. The screener now replies to initialize with a SCREENER_UNAVAILABLE error, or sends it once loading fails, and shows a load error instead of throwing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the Salesforce component's record changed, or staff started another screening, the host disposed its connection but the old popup kept showing live results that nobody received. The host adapter's dispose() now sends disconnect, and the screener stops sending results and tells the user it's no longer connected. This covers any host, not only Salesforce. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Any site could pass its own integrationOrigin, open or frame a published screener, and receive every answer and result the person entered. Builders now list allowed CRM origins in the Publish tab. They are saved with the screener in normalized browser form, copied on publish, and returned with the published screener. The screener starts its bridge once that list has loaded. A host whose origin isn't listed gets an ORIGIN_NOT_ALLOWED reply and nothing else, while the person still sees a working standalone form with a notice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
prestoncabe
force-pushed
the
543-crm-integrations
branch
from
October 10, 2026 02:32
67a4cd5 to
da75860
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CRMs can now open a published screener in an iframe or separate window, prefill answers from a client record, and receive evaluated results for an explicit save back to that record. Each integration owns its field mapping and persistence; BDT does not need CRM credentials.
Closes #543.
Verification
builder-frontend:npm test— 221 tests passed after integrating current main; the subsequent lifecycle regression test also passed in the focused 9-testScreener.test.tsxrun.builder-frontend:npm run buildpassed.builder-api:mvn -Dtest=ScreenerResourceTest test— 7 tests passed, including CRM origin validation.e2e:playwright test --project=crm-integrations— 7 Chromium tests passed. Covers iframe/popup workflows with object/JSON messages, prefill, edits, explicit persistence, disconnects, rejected origins, standalone behavior, and side-by-side results. API responses are intercepted; these tests do not modify Firebase.docs:npm run buildpassed;git diff --checkpassed.Documentation impact