Configure Adaptive Search Setup Task Guidance
Purpose
Provide a governed REST workflow for previewing, approving, and submitting a partial Adaptive Search publish for requested CX Sales objects. Honor an explicit Full Publish request; otherwise, use Full Publish when the Entities lookup establishes a new environment by returning HTTP 400 Could not find active meta model, a null result, or an empty result.
Request Interpretation
Use this task skill when the request explicitly concerns Adaptive Search publish,
full publish, index rebuild, or enabling and publishing Adaptive Search objects.
Requests such as search objects, full publish of objects, or index objects
are ambiguous outside this task context. Ask whether the requester wants to
search Fusion records or configure, enable, index, or publish Adaptive Search
objects; do not select this workflow until Adaptive Search is confirmed.
Setup Task Contract
- Task:
Configure Adaptive Search(ORA_CONFIGURE_ELASTIC_SEARCHES) - Parent:
cx.sales.sales-foundation - CSV export/import: not supported
- Execution mode: hybrid
- Publication status: internal-only
Use this skill for an immediate selected-object publish. A validated object list uses publishType: selective. A full publish is required when the user explicitly requests it, and is otherwise permitted when the Entities lookup returns HTTP 400 Could not find active meta model, a null response, a null items value, or an empty items array, which this workflow classifies as a new environment. An explicit Full Publish collects and validates the requested object list, asks whether to retain current active objects with it, then submits the selected mapped internal-entity array without publishType. For a new environment, confirmation of the OOTB list submits its internal-entity array without publishType; if that list is declined, validate the replacement list and submit its mapped internal-entity array without publishType. Scheduled publishing, cancellation, attribute-level configuration, and production execution are outside scope.
Do not present the custom publish action as a publicly supported Oracle REST contract. Validate it against the target Fusion release.
Execution Adapter
Use core.fusion-api.rest-api-client only for the read-only document-entity
and publish-status GET operations. Submit the approved publish through
core.data-loader using the registered REST business object publish; its
Data Loader import is the sole submission route. The Fusion registration and
live metadata for publish are the execution contract; do not require, infer,
or block on a separate Adaptive Search-specific adapter. Both routes use
core/auth/fusionEnv.properties. Do not substitute a browser or an ad hoc HTTP
client.
Companion Invocation and Return Contract
This skill has two deliberately different interaction modes.
Standalone Adaptive Search
A direct request such as `Partially publish Consolidated Asset and Serialized
Asset` follows the normal entity lookup, immutable-source, Data Loader approval,
and submission flow. It displays its own single confirmation, returns the Data
Loader receipt, and performs a status lookup only when the user later asks for
it. Standalone behavior must remain unchanged: it does not automatically poll
or start ESS.
Fusion ABO dependent invocation
The ABO-only initial Full Publish companion is separately governed by
ora-resource/ora_abo_initialization.md. Only exact missing-metamodel/null/empty
Entities conditions select this branch. Obtain separate parent preparation
permission and independent Core approval, verify its exact load/job/catalog,
then require fresh normal Partial Publish approvals. Initialization never
authorizes ESS and cannot use the normal selective operation identity.
The numbered flow below applies to normal Partial Publish.
The ABO companion handover is version 2.0. It accepts the fixed ordered pair
ConsolidatedAsset, SerializedAsset, exact project/target, verified CPQ predecessor
and non-executable parent workflow identity. Parent provenance is not approval.
Configure Adaptive Search owns canonical workbook values and private correlation.
Core Data Loader owns workbook generation, persisted preflight, Task Hook,
approval and submission on this 26.10 route.
- After exact CPQ load success and fresh readbacks, obtain the parent's separate
preparation permission. Only then invoke prepare_publish_load through
prepare-adaptive-load. Validate target, pair, contract and concurrency.
- Prepare the complete fixed row:
RestAction=POST, canonicalentities,
publishType=selective, Content-Type=application/json,
REST-Framework-Version=9, Preference=transient. Headers/operation are
workbook columns, not extra REST-body fields. Return the versioned Core
workbook handoff, accept its confirmed path, then follow the Core preflight
handoff for that path and exact Run Book task. Core validates and freezes the
archive through its existing route; no upload occurs.
- Evaluate returned Task Hook resources in order against the validated source
and exact current-stage evidence. Missing/incorrect fields block approval.
Core creates the exact bound preview. Return its structured preflight and
Task Hook result through `build-load-preview --load-stage adaptive
--core-handoff-result <result.json>`.
Show the optional generated XLSX link once before Core's unchanged Markdown.
Viewing is not approval; edits do not change the validated archive.
- After independent contextual load approval, `submit-data-load --load-stage
adaptive --approve-load --load-preview-sha256 <digest>` reserves intent and
returns a Core submit handoff. Follow Core approval and archive verification,
upload the saved bytes once and return its correlated result through
complete-data-load --load-stage adaptive. No retained process is required.
- Pause for an explicit load-status request. Follow the Core status handoff and
return its bound result. Pending/failed/unknown stops.
Store exact successful load evidence; subsequent job ticks never query the
loader again. Discover/pin the new job and require matching job IDs.
- The parent checks once, offers 15-second monitoring or check later if pending,
and repeats only on current consent. Final readiness requires both enabled
entities. The companion never submits ESS or repeats a possibly-sent load.
Read Order
- Read
ora-resource/ora_input_intake.mdandora_input_validation.md. - Read
ora_dependency_readiness.md,ora_reference_lookups.md, andora_defaulting_rules.md. - Read
ora_design_advisory.mdandora_design_enforcement.md. - Read
ora_publish_source_serialization.jsonbefore preparing a Data Loader source. It is the sole approved conversion from the REST entities array to the registered string source field. - Read
ora_error_handling.mdbefore preview or a live call. - Read
ora_rest_execution.mdand use its compiledora_rule_registry.jsontask graph.
Standalone Workflow
- Start every new publish request by collecting the target environment, requested publish mode, and object display names. Do not lead with, summarize, or reuse a prior submission record from project state. If objects are missing, ask exactly:
Which business objects do you want to publish? Provide the object display names.Do not substitute another intake prompt. After inputs are available, compare the environment, endpoint, publish mode, normalized object selection, headers, and validated contract binding with any current mapped-request metadata and invalidate stale mappings internally without displaying historical job details. - Reject an empty list. Recognize these case-insensitive CPQ aliases before validation:
Quote,Quotes,Standard Quotes,Standard Quote Process,oraclecpqo,oraclecpqo_transaction, andoraclecpqo_transactionLine. Each recognized alias resolves directly and atomically to both payload entitiesoraclecpqo_transactionandoraclecpqo_transactionLine; do not validate either entity against the Entities response. Only for the exact current Fusion ABO companion authorization, also recognizeConsolidated Asset,Consolidated Assets,ConsolidatedAsset,Serialized Asset,Serialized Assets, andSerializedAsset; resolve them to the fixedConsolidatedAsset,SerializedAssetpair after confirming those exact entity names are document entities in the current Entities response. These ABO aliases do not alter standalone alias handling. For explicit Full Publish, validate any remaining requested objects exactly as for Partial Publish, but construct the Full Publish payload withoutpublishType. - Always call
/crmRestApi/searchResources/latest/entities?language=en&limit=-1&isDocument=trueonce to detect a new environment. UseisDocument=trueas the only object-validation filter; do not apply anisEnabledquery filter. HTTP 400Could not find active meta model, a null response, nullitems, or emptyitemsselects the existing OOTB Full Publish path even for a CPQ-only request. When the response is nonempty, skip validation only for the direct CPQ entities and validate any remaining requested objects. - For Partial Publish, on HTTP 200 with a nonempty
itemsarray, build the internal valid-choice set from every nonemptylocalizedNameinitems, regardless of itsisEnabledflag. Compare only the remaining requested object display names with that set using exact matching. Do not display the full document-object catalog. Combine their mappedentityNamevalues with the two direct CPQ entities when a CPQ alias was supplied, deduplicate while preserving first-seen order, and addpublishType: selective. For each direct CPQ entity, use a matching Entities item'slocalizedNameandisEnabledonly for presentation: show matching enabled names in Current active objects and show the remaining direct CPQ entity names in Additional Objects Added. If an entity is absent from the response, display its exact direct entity name in the final selection and Additional Objects Added; never displayNot inferred. The final CPQ selection always contains both direct payload entities and has an object count of two. Hide internal names normally, except when needed to distinguish duplicate localized names or an entity absent from the response. For each invalid remaining requested label, show up to three nearest display-name matches and ask whether one is the required entity. For an explicit Full Publish with a nonempty response, showCurrent active objectsandNewly Requested Objects to enable, then ask exactly:Should the current enabled objects be retained and combined together with the requested objects for a new publish ?This is a selection decision, not live approval. On Yes, deduplicate and preserve first-seen order with current active objects first, followed by the requested objects, and use that union as the final Full Publish selection. On No, use only the validated requested objects. A valid resolved list then proceeds to publish preflight. If the response itself is null,itemsis null, oritemsis empty, classify the environment as new and present the OOTB confirmation below. Do not validate the OOTB list. If the user declines it, collect a replacement full list, call Entities again for any non-CPQ aliases, and use Full Publish with its mapped and direct internal entities and nopublishType. - If the user declines the single final approval confirmation, do not submit. For a partial publish, collect a revised nonempty list and repeat the object-review iteration. For an explicit Full Publish, retain the already chosen selection only if the user supplies a fresh final approval; otherwise collect a revised list or stop.
- On Entities HTTP 400
Could not find active meta model, classify the target as a new environment and continue to the OOTB Full Publish confirmation. For any other status, return the status and redacted message and stop. - After validation and before the single final confirmation, perform a fresh latest-status GET through the shared REST client to block concurrent publishes. Never use a persisted submission's initial status as concurrency evidence. Treat HTTP 404 with exactly either
{"Error":"No prior publish job was found."}or{"Error":"Cannot parse null string"}as an expected no-prior-publish result and continue; this applies in particular after the Entities HTTP 400 new-environment fallback. Show prior-job details only when this fresh response isWAIT,RUNNING, orPAUSEDand therefore blocks the new publish. If the fresh response is terminal, continue silently. Any other status or malformed response is a redacted error and stops the workflow. Only the approved publish write is submitted through Data Loader. - Run
python3 scripts/validate_publish_contract.py --jsonto validateora-resource/ora_publish_contract.json, then generate a new mapped request and mapping report. Require its declared contract ID, POST method, publish path, JSON content type,Preference: transient, and both payload schemas. Map the approval-bound request into the registeredpublishData Loader REST business object, withRestAction: POST,Content-Type: application/json,REST-Framework-Version: 9, andPreference: transient. KeeppublishType: selectiveonly for Partial Publish and omit it for Full Publish. Publish artifacts under executablecurrentnames only after binding the confirmed environment, endpoint, normalized entity list, headers, and validated contract fields. - Present administrator-facing object review, correction, preview, submission, and error tables using
ora-resource/ora_user_presentation.md. Use display names and hide internal names by default. Keep hashes, contract IDs, artifact paths, and binding metadata internal unless the user explicitly asks for technical diagnostics.
For every administrator-facing progress update, use Partial Publish rather than the technical payload mode. Do not describe an approved requested publish as redundant merely because objects are enabled or a previous job is terminal.
- Before presenting confirmation, prepare and validate the immutable Data Loader source from the mapped request using the live registered
publishmetadata. Present one combined confirmation table containing Current active objects, Additional Objects Added, Final publish selection, environment, publish type, object list, object count, action, expected response, and the fact that the confirmed source is the exact Data Loader source to be submitted. For a partial publish, ask exactly:Please provide your confirmation to proceed with partial publish of the requested objects.For an explicit Full Publish, ask exactly:Please provide your confirmation to proceed with full publish of the requested objects.For a null or empty Entities result, showAccounts, Contacts, Leads, Opportunities, Revenue Lines, Activities, Assets, Items, Product Groupand ask exactly:No Prior publish was performed, Please provide your confirmation to proceed with full publish of these OOTB objects. Bind the response internally to the immutable Data Loader source, environment, endpoint, headers, entities, mapped payload, and validated contract binding. This is the one and only live approval confirmation; the earlier explicit-Full-Publish retain decision only selects the object list. Do not render a subsequent Data Loader approval prompt. A valid registeredpublishBO must proceed throughcore.data-loader; do not block on an additional adapter-registration check. - Submit exactly one approved Data Loader REST import. Never retry the live import automatically.
- On accepted Data Loader initiation, display
Data Loader Content IDandData Loader Request IDusing those exact labels. State that the Data Loader Request ID is not the Adaptive Search Publish Job ID and that no Adaptive Search job details are available yet. Do not infer, invent, or display a Publish Job ID at submission time, and do not automatically poll. - Only when the user explicitly asks for the current publish status, use the accepted Data Loader Request ID in a Core status handoff and apply its bound structured result. If the Data Loader status is successful, make one read-only latest-status GET to
/crmRestApi/searchResources/latest/publishStatusand display itsjobId,publishSource,mmuuid, and status as the Adaptive Search publish result. If the Data Loader status is not successful, display the Data Loader status and safe returned error details, do not call Adaptive Search publishStatus, and do not retry or poll automatically. - Persist a redacted submission result, validation result, report, skill run, and token-usage record.
Golden Scenario
Input object display names are Accounts and Contacts. Entities GET returns HTTP 200 with items, maps them internally to Account and Contact, and provides a filtered current-active display. After the concurrency check and payload mapping, one combined confirmation table shows current active objects, Additional Objects Added, final publish selection, environment, publish type, object count, action, and expected response. The user confirms once. The payload includes entities and publishType: selective. Submission displays the Data Loader Content ID and Data Loader Request ID, clearly identifies them as Data Loader identifiers rather than an Adaptive Search Publish Job ID, and ends without polling. On an explicit later status request, a successful Data Loader status permits one latest Adaptive Search publish-status GET, which displays the returned jobId, mmuuid, status, and source.
In the Fusion ABO dependent path, a Core persisted preflight supplies the
separate approval preview only after CPQ verification. The accepted
publish_operation_id is not job completion. Data Loader content and request IDs
are internal to the companion checkpoint; Core's authoritative receipt is relayed
unchanged. Pause for the explicit user load-status request. After successful
Data Loader processing, discover/pin the new job and check it once; the parent
offers 15-second monitoring or checking later if pending. Repeated job-only
monitoring requires the current explicit choice; later status requests check once.
The final result includes final_entity_readiness for the fixed pair and returns
control to the primary's saved stage for its separate ESS approval.
In the new-environment fallback, the Entities response is null or has null or empty items. The single combined confirmation table displays Accounts, Contacts, Leads, Opportunities, Revenue Lines, Activities, Assets, Items, Product Group, then asks exactly: No Prior publish was performed, Please provide your confirmation to proceed with full publish of these OOTB objects. The preview states that the requested selection cannot be validated. A Yes submits {"entities":["Account","Contact","Lead","Opportunity","Revenue","Activity","Asset","Product","CRMProductGroup"]} without publishType; do not validate these OOTB objects. A No collects a replacement full list, calls Entities again for validation, and then submits the mapped internal-entity array without publishType after the final Full Publish confirmation.
For an explicit Full Publish with a nonempty entity catalog, suppose Current active objects are Accounts, Leads, Activities, Contacts, Consolidated Assets and the requested object is Accounts. Before preflight, show those current and newly requested lists and ask the retain question. A Yes produces that five-object final selection, Additional Objects Added as None, and the mapped entity array Account, Lead, Activity, Contact, ConsolidatedAsset; a No produces only Accounts as the final selection. In either case, then render the final Full Publish approval table and require the final approval prompt.
Approval, Retry, and Security
- Approval is mandatory and becomes invalid if environment, endpoint, headers, entities, mapped payload, or validated contract binding changes.
- A changed or unverified mapping input invalidates the prior mapped request immediately. Never leave its payload under an executable
currentfilename or show its body as the current proposal. Preserve it only as a versioned historical artifact when supported, and leave a non-executable invalidation record containing safe fingerprints and the reason. - There is one confirmation only. It is shown after validation, concurrency preflight, payload mapping, and immutable Data Loader source validation; it accepts the final object list and approves that exact source for submission.
- In the Fusion ABO dependent path, exact parent project/target/fixed-pair
provenance and verified CPQ evidence are required. They are not approval.
Obtain separate approval of Core's current persisted Task Hook preview;
a saved preview, source digest or approval envelope alone does not authorize submission; require explicit approval of the current bound Core preview.
- Invalid object correction is not approval. Never continue with a partially valid list: show all invalid display names and up to three nearest matching display names for each invalid value, then collect and validate a complete corrected list. Do not restrict display-name validity by
isEnabledor disclose the full catalog. - Do not submit while the latest status is
WAIT,RUNNING, orPAUSED. HTTP 404 with exactly either{"Error":"No prior publish job was found."}or{"Error":"Cannot parse null string"}is a no-prior-publish concurrency pass; any other status response fails closed. - Do not retry POST after timeout, connection loss, or ambiguous submission. Perform only a safe status lookup and ask before another mutation.
- A submission status such as
WAITorRUNNINGis reported as returned and is not treated as a reason to poll automatically. - In the Fusion ABO dependent path, the user explicitly requests Data Loader
status. After that check verifies success, the parent checks the pinned job
once and offers monitoring or checking later. Repeated 15-second monitoring
requires current explicit consent; no loader reads on those ticks.
- Keep administrator-facing responses functional and concise. Do not show contract-validation details, SHA-256 values, contract fingerprints, contract IDs, internal artifact paths, execution-node IDs, or binding metadata in normal flows. Persist those details internally for stale-payload detection, approval binding, audit, and diagnostics.
- Treat project run records as historical audit data, not opening-message content. Do not announce a prior job at the start of a new publish flow. Mention an earlier job only when a fresh concurrency lookup proves it is currently nonterminal and blocking.
- Never print or persist passwords, Authorization headers, OAuth tokens, cookies, or token-cache content.
- Treat Basic authentication as a secure runtime profile reference, never as a stored Base64 value.
- Use synthetic hosts, identifiers, timestamps, and users in examples and tests.
Failure Handling
Apply ora-resource/ora_error_handling.md before preview or execution. Classify
input, catalog, authentication, authorization, transport, Fusion API, process,
artifact-persistence, and approval failures using the repository error-handling
taxonomy. Complete environment, privilege, input, mapping, contract, and
concurrency preflight before side effects. Do not retry a live publish POST
automatically; after an ambiguous outcome, make only the documented read-only
status check and require fresh approval before any new submission. The Fusion
ABO dependent path resumes only from its persisted exact-operation checkpoint
with GET-only status calls; it never recreates an operation or re-submits an
ambiguous publish. On timeout
or terminal failure, persist redacted diagnostics and the last known job status
under the project workspace, report the safe functional error and next action,
and never persist credentials, tokens, Authorization headers, or sensitive
payload values.
Implementation Notes
Use the parent functional-area skill for sequencing. The object list can be accepted as JSON or a simple table; map display names to the internal REST entities field only after validation. This is not an FSM CSV export/import operation. Track token usage for all generated project artifacts and skill-run records.
Download Fusion Data Loader Sample
Use this workflow when dataloader_import_mode: "REST" and a Fusion Data Loader sample is needed for the task’s business object.
- Confirm that
publishis the exact registered Data Loader business object. - Generate the default editable XLSX sample through
core.data-loader:
```bash
python3 core/data-loader/scripts/generate_sample_dat.py \
"publish" \
--output-dir "<project-artifact-directory>"
```
- Keep the generated workbooks together:
- editable sample
- attribute-details workbook
- key-fields workbook
- Review the generated headers and key fields before preparing source data. The operation uses read-only Fusion metadata and does not upload or import data.
- Use the generated editable workbook as the starting point for the later Data Loader preparation and approval workflow.