ODS Lookup is a workflow action that searches Sharedo’s ODS for an existing person or organisation using whatever identity details are available at runtime. It helps workflow authors reduce duplicate ODS records, reconcile inbound contact channels, and pre-fill downstream participant steps with a reliable ODS identifier.
What it does
Many intake and referral processes receive incomplete data: an email address, a phone number, a name, a company number, or some combination of those fields. ODS Lookup turns those fragments into a single workflow decision:
- search ODS for likely person and organisation matches;
- score each candidate against the supplied channels;
- write the best match’s ODS id, entity type, confidence score, and matched fields to workflow variables;
- route the workflow through
found,notFound, orfailed.
This allows a workflow to make a clear next-step decision without re-implementing ODS search and scoring logic in every process.
Common use cases
Dedupe inbound enquiries
When a web form, email intake, or referral creates a new enquiry, run ODS Lookup before creating new parties. If a strong match is found, the workflow can branch to a review or merge path instead of creating a duplicate person or organisation.
Screen-pop and caller reconciliation
For telephony or assisted intake flows, a caller may be known by phone number, name, or email. ODS Lookup can combine those signals and return the best existing ODS record for the workflow to use in the next step.
Referral pre-fill
Referral workflows often receive referrer, respondent, organisation, or contact details from external sources. ODS Lookup can find the existing ODS record and populate participant or follow-up steps with less manual searching.
Business value
- Reduces duplicate ODS records by checking for an existing party before creation.
- Improves workflow consistency by centralising lookup and scoring rules in one action.
- Speeds up intake by returning an ODS id that can feed downstream participant, fetch, or branching steps.
- Supports partial data because the action works with any configured combination of email, phone, names, organisation name, and company number.
- Makes automation safer by exposing a confidence score and matched-field list rather than returning only a yes/no result.
Search inputs
The action can use any combination of:
- email;
- phone;
- first name;
- last name;
- organisation name;
- company number.
At least one input variable must be configured. Empty runtime values are ignored and do not contribute to the score.
Search scope
Workflow authors can configure the action to search:
- people only;
- organisations only;
- both people and organisations.
The default is to search both.
Confidence scoring
ODS Lookup assigns a score from 0 to 1 based on the fields that matched. The score is used to decide whether the found or notFound outlet should fire.
Default minimum confidence is 0.5.
Typical scoring signals include:
| Signal | Weight |
|---|---|
| Email exact match | 0.5 |
| Company number match | 0.5 |
| Phone match | 0.4 |
| First name + last name match | 0.3 |
| Organisation name match | 0.3 |
| Last name only | 0.1 |
| Optional fuzzy surname / organisation-name match | 0.2 |
Scores are capped at 1.0.
Outputs
The action can write:
- matched ODS id;
- matched ODS type:
personororganisation; - confidence score;
- comma-separated matched fields, such as
email,phone.
The ODS id output is mandatory so the match can be used by later workflow steps.
Workflow outcomes
ODS Lookup has three outlets:
- found — a best candidate was found with a score greater than or equal to the configured minimum confidence;
- notFound — no usable inputs were present, no candidates matched, or the best candidate was below the confidence threshold;
- failed — the ODS lookup call failed or the lookup service returned an application error.
When to use it
Use ODS Lookup when a workflow needs to decide whether a person or organisation already exists in ODS before creating or linking records.
It is especially useful in:
- enquiry intake;
- matter creation;
- referral processing;
- participant pre-fill;
- duplicate prevention;
- contact-centre or screen-pop workflows.
ODS Lookup technical notes
Component identity
- Kind: Visual Workflow action
- System name:
AltOdsLookup - Designer widget:
Alt.OdsLookupDesigner - Source path:
src/vw-actions/ods-lookup - Manifest:
manifests/AltOdsLookup.wf-action.json - Designer manifest:
manifests/designer.widget.json - Runtime template:
template.ts - Designer factory:
factory.ts - Designer view model:
designer.ts - Pure logic:
scorer.ts,types.ts
Runtime architecture
The action is split into:
- Factory (
factory.ts)
- Uses
defineWfActionFactoryfrom@alterspective-engine/foundry. - Creates Knockout observables for all configuration fields.
- Registers outlets and validation.
- Tracks workflow variables for designer integration and cleanup.
- Designer (
designer.ts+templates/OdsLookupDesigner.html)
- Provides the workflow node properties panel.
- Binds to the factory-populated
action.configandaction.uifields. - No async designer initialisation is required.
- Template (
template.ts)
- Runs server-side in the Sharedo workflow runtime.
- Reads input variable names from
$model.Configuration. - Resolves runtime values from
ctx. - Calls the tenant-installed ODS lookup plugin endpoint.
- Parses and scores candidates.
- Writes outputs to
ctx. - Fires
found,notFound, orfailed.
- Scorer (
scorer.ts)
- Contains pure, testable logic for:
- checking whether any input exists;
- parsing supported response shapes;
- normalising candidate rows;
- scoring candidates;
- sorting candidates by score and tie-break rules.
API dependency
The runtime calls:
POST /api/plugin/alterspective/ods/lookup
The manifest marks this as an internal/plugin API dependency because no public ODS lookup route is available in the source context. The endpoint is expected to be tenant-installed, read-only, and workflow-safe.
Request body shape:
{
"email": "string|null",
"phone": "string|null",
"firstName": "string|null",
"lastName": "string|null",
"organisationName": "string|null",
"companyNumber": "string|null",
"entityTypes": "person|organisation|both",
"enableFuzzyMatching": true,
"pageSize": 10,
"includeInactive": false
}
Configuration contract
StepConfig contains:
| Field | Type | Purpose | ||
|---|---|---|---|---|
emailVariable | string | Workflow variable name containing email input | ||
phoneVariable | string | Workflow variable name containing phone input | ||
firstNameVariable | string | Workflow variable name containing first name input | ||
lastNameVariable | string | Workflow variable name containing last name input | ||
organisationNameVariable | string | Workflow variable name containing organisation name input | ||
companyNumberVariable | string | Workflow variable name containing company number input | ||
entityTypes | `person \ | organisation \ | both` | Entity type filter |
enableFuzzyMatching | boolean | Passes fuzzy-name matching preference to the plugin endpoint | ||
minConfidence | number | Threshold for found; default 0.5 | ||
pageSize | number | Max candidate count requested; default 10, capped at 50 | ||
odsIdVariable | string | Output variable for matched ODS id | ||
odsTypeVariable | string | Output variable for person, organisation, or empty | ||
confidenceVariable | string | Output variable for numeric confidence score | ||
matchedFieldsVariable | string | Output variable for matched channel CSV |
Defaults
The factory default configuration is:
{
"emailVariable": "",
"phoneVariable": "",
"firstNameVariable": "",
"lastNameVariable": "",
"organisationNameVariable": "",
"companyNumberVariable": "",
"entityTypes": "both",
"enableFuzzyMatching": false,
"minConfidence": 0.5,
"pageSize": 10,
"odsIdVariable": "",
"odsTypeVariable": "",
"confidenceVariable": "",
"matchedFieldsVariable": ""
}
Validation
Factory validation enforces:
- at least one input variable must be configured;
odsIdVariableis required;minConfidencemust be a number between0and1.
Runtime also handles cases where configured input variables exist but their runtime values are empty. If all runtime inputs are empty, the action writes empty outputs and fires notFound.
Outlets
The factory registers:
| Outlet | Meaning |
|---|---|
found | Best match score is greater than or equal to minConfidence |
notFound | No inputs, no candidates, no score, or best score below threshold |
failed | HTTP or plugin-level application failure |
Runtime success and failure handling uses Foundry workflow-runtime helpers:
handleSuccesshandleFailureclassifyHttpError
Candidate parsing
parseSearchResponse supports multiple response shapes:
- Plugin endpoint shape:
items: [{ odsId, odsType, firstName, lastName, email, phone, ... }]
- Public-style ODS query shape:
results: [{ id, data: { ... } }]
- Legacy/internal search shape:
rows: [{ id, odsEntityType, result: "<json>" }]
Only active candidates are returned. Rows with isActive === false are filtered out.
Scoring rules
Local fallback scoring uses:
| Channel | Rule | Weight |
|---|---|---|
email | Case-insensitive exact match | 0.5 |
companyNumber | Digits-only equality | 0.5 |
phone | Digits-only equality | 0.4 |
firstLast | First and last both match case-insensitively | 0.3 |
organisationName | Candidate organisation name contains input, case-insensitive | 0.3 |
lastName | Last name exact match when first+last did not match | 0.1 |
The type definitions also include fuzzy channels:
fuzzyLastNamefuzzyOrganisationName
The template passes enableFuzzyMatching to the plugin endpoint. If the plugin returns server-provided matchScore and matchedFields, scoreCandidates uses those values instead of recalculating local fallback scoring. This is how plugin-side fuzzy scoring can be honoured.
Sorting and tie-breaks
Candidates are sorted by:
- score descending;
- original result order ascending;
- person before organisation as final tie-break.
This preserves upstream relevance ordering where scores are equal.
Output behaviour
When found fires:
odsIdVariablereceives the best candidate’s ODS id;odsTypeVariablereceivespersonororganisation;confidenceVariablereceives the numeric score;matchedFieldsVariablereceives a comma-separated matched-channel list.
When notFound fires:
odsIdVariablereceives an empty string;odsTypeVariablereceives an empty string;confidenceVariablereceives the best score if available, otherwise0;matchedFieldsVariablereceives an empty string.
When failed fires:
- output variables are not populated by the failure branch.
Runtime safeguards
minConfidenceis clamped to0..1, defaulting to0.5.pageSizeis clamped to1..50, defaulting to10.- Empty input values are ignored.
- Response body preview logging is truncated to reduce oversized log entries.
- Failed HTTP responses and plugin application errors route to
failed.
Build and deployment
This action follows the repo-wide workflow action conventions under src/vw-actions/{slug}.
Do not add per-component deploy scripts. Use the unified deployment wrapper:
npm run deploy:tenant -- --tenant <tenant> --widget AltOdsLookup
The designer widget may require a separate first-time deployment pass depending on tenant state and Foundry packaging behaviour:
npm run deploy:tenant -- --tenant <tenant> --widget Alt.OdsLookupDesigner
Tests
The behaviour signal includes a scorer test suite covering:
- search string construction;
- input detection;
- parsing plugin, public, legacy, malformed, and empty response shapes;
- inactive entity filtering;
- company number extraction;
- server-provided match metadata;
- email, phone, name, organisation, and company-number scoring behaviour;
- phone formatting handling;
- no-match scoring.
How it's built
| Component id | AltOdsLookup |
|---|---|
| Kind | vw-action |
| Categories | Alterspective |
| Configurable | Yes — designer Alt.OdsLookupDesigner |
| Foundry-backed | Yes — consumes @alterspective/foundry |
| Version | — |
| Status | deployed |
| Tier | T2 |
| Source | src/vw-actions/ods-lookup |
Git is the single source of truth — the component lives at src/vw-actions/ods-lookup. Deployment is to the Sharedo IDE; the manifest defines how the platform loads it.
ODS Lookup user guide
Purpose
Use ODS Lookup when a workflow needs to find an existing ODS person or organisation from partial details such as email, phone, name, organisation name, or company number.
The action returns the best match and a confidence score so the workflow can decide whether to use the existing ODS record, ask for review, or continue as a new record.
Add the action
- Open the workflow designer.
- Add the ODS Lookup action from the Alterspective action category.
- Give the action a clear name, such as:
Lookup referrer in ODSCheck for existing personFind organisation by company number
Configure inputs
In Inputs, choose one or more workflow variables to search with.
Available inputs are:
- Email variable
- Phone variable
- First name variable
- Last name variable
- Organisation name variable
- Company number variable
You must configure at least one input variable.
At runtime, the action only uses variables that contain a non-empty value. For example, if you configure email and phone but the phone value is blank, only email contributes to the lookup.
Choose search scope
In Search options, choose Search across:
- Both — search people and organisations.
- Persons only — search only person records.
- Organisations only — search only organisation records.
Use Both when the incoming data could be either a person or an organisation. Use a narrower option when the workflow already knows what type of party it is looking for.
Configure fuzzy matching
The Enable conservative fuzzy matching for surnames and organisation names option allows the lookup service to tolerate light spelling differences.
Recommended guidance:
- Leave it off for strict dedupe checks.
- Turn it on where spelling variation is common and a human review step follows.
- Avoid relying on fuzzy matching alone for fully automated high-impact decisions.
Set minimum confidence
Minimum confidence controls when the action fires found.
Default: 0.5
The action scores the best match from 0 to 1.
Examples:
0.5means an email match, company-number match, or a strong combination of other details can be enough.0.8requires stronger evidence and is better for more automated linking.0.3is more permissive and may be useful before a manual
How to use it
In the Visual Workflow editor, find ODS Lookup in the toolbox under the Alterspective category and drag it onto a step. Configure its inputs/outlets in the node's designer panel.
For the authoritative configuration fields and behaviour, see the component's designer help panel and the source linked in the footer.