CX Import Export Management
Use this core skill to submit Oracle CX Sales and Fusion Service Import Management import activities and Export Management bulk export activities.
Required Reference
Before changing payload behavior or troubleshooting field names, read:
references/oracle-cx-import-export-management.md
Key Boundary
Import Management accepts UCM document names, not CSV rows. Local CSV imports
must use prepare-import → approve-import → execute-approved-import.
Bare create-import --execute and upload-ucm --execute are disabled before
configuration or token access, including imports based only on a supplied UCM
content ID. The legacy commands remain available for payload previews.
Approved Import Workflow
- Complete the governing Data Loader/Task Hook source review, object-support, privilege, and task validation gates. Resolve the exact object's UCM account; never guess an account or substitute another object.
- Run
prepare-importwith the exact local data CSVs and execution settings. It reads sources without transforming their contents, validates the fixedcore/auth/fusionEnv.propertiesprofile against the OAuth trust policy, and confirmsUcmAccountthrough the exact object's live metadata. It makes no Fusion mutation. Repeat--upload-filefor multiple data CSVs in upload order; mapping CSVs and existing-content-ID imports are not supported by this path. - Present the returned manifest,
approvalId, andreviewSha256with the governing preview. The manifest binds ordered basenames and byte digests, canonical CSV-group SHA-256, normalized target/environment and OAuth profile, object, ImportMode, UCM account/transport, activity name, activation, and schedule. Obtain explicit approval for these exact values before issuingapprove-import. An existing explicit approval of this same manifest satisfies this gate; do not ask twice for the same execution. - Call
approve-import --approval-id <id> --review-sha256 <reviewed-digest>. This records the approving OS UID and a 15-minute expiry (maximum one hour). It cannot update or renew an existing approval. No Fusion call occurs. - Call
execute-approved-import --approval-id <id>with the identical source list and settings. The adapter checks the protected record before token acquisition, reads each source once, compares every approved field, and atomically consumes the approval before authenticated traffic. It rereads only the fixed profile and exact object account metadata to confirm the target, failing on drift. It uploads the already verified in-memory bytes. - Persist the redacted receipt and any partial-success identifiers under the
active project's artifacts. A failed/uncertain attempt spends the approval;
reconcile the returned UCM and import IDs before requesting a new approval.
Mutating requests are never automatically retried. Use
get-importfor subsequent status checks; submission is not proof of completed import.
The approval authority is the current OS account's fixed private store at
~/.fusionaim/cx-import-approvals/ (directory 0700, records 0600, no symlink
traversal). Workspace JSON previews are review copies, never authorization
sources. Approval IDs are random and cannot select arbitrary files; a separate
atomic consumption record blocks replay and concurrent execution. No signing
key, tokens, or source content is stored in approval records. This boundary
protects against edited project artifacts; it does not protect against a
compromised approving OS account or modified trusted FSCR code.
Commands
Prepare the exact import for review (read-only Fusion metadata lookup):
python3 core/fusion-api/cx-import-export-management/scripts/cx_import_export_job.py prepare-import \
--name "Account import" \
--object-code Account \
--import-mode CREATE_RECORD \
--upload-file accounts.csv \
--ucm-document-account 'crm$/import$' \
--activate YES \
--schedule ONE_TIME_IMMEDIATE
After explicit approval of the returned manifest:
python3 core/fusion-api/cx-import-export-management/scripts/cx_import_export_job.py approve-import \
--approval-id <id> --review-sha256 <reviewed-digest>
python3 core/fusion-api/cx-import-export-management/scripts/cx_import_export_job.py execute-approved-import \
--approval-id <id> \
--name "Account import" \
--object-code Account \
--import-mode CREATE_RECORD \
--upload-file accounts.csv \
--ucm-document-account 'crm$/import$' \
--activate YES \
--schedule ONE_TIME_IMMEDIATE
Export and import-mapping creation retain their explicit --execute gate and
require preview and user approval. Export status, bounded polling, and download
commands retain their existing behavior.
Create an import mapping with columns in one REST call:
python3 core/fusion-api/cx-import-export-management/scripts/cx_import_export_job.py create-import-mapping \
--name "Account import map" \
--object-code Account \
--column "OrganizationName=OrganizationName:Codex Account" \
--column "Country=Country:GB" \
--execute \
--token-cache auto
Create and activate a bulk export activity:
python3 core/fusion-api/cx-import-export-management/scripts/cx_import_export_job.py create-export \
--name "Account export" \
--export-object Account \
--export-column-names "PartyNumber,OrganizationName" \
--export-filter-criteria "PartyNumber IS NOT NULL" \
--activate YES \
--wait-seconds 600 \
--execute \
--token-cache auto
Create, activate, poll, and download an export in one command:
python3 core/fusion-api/cx-import-export-management/scripts/cx_import_export_job.py create-export \
--name "Account export" \
--export-object Account \
--activate YES \
--execute \
--wait-seconds 600 \
--poll-interval 30 \
--download-output project/{project_id}/exports/cx/account-export.zip \
--token-cache auto
Download the completed export output:
python3 core/fusion-api/cx-import-export-management/scripts/cx_import_export_job.py download-export \
--bulk-export-job-id 300000000000002 \
--download-output project/{project_id}/exports/cx/account-export.zip \
--token-cache auto
Use a full Oracle payload file when the request needs fields not exposed as first-class CLI flags:
python3 core/fusion-api/cx-import-export-management/scripts/cx_import_export_job.py create-export \
--payload-file export-payload.json \
--execute \
--token-cache auto
Check status:
python3 core/fusion-api/cx-import-export-management/scripts/cx_import_export_job.py get-import \
--import-activity-id 300000000000001 \
--token-cache auto
python3 core/fusion-api/cx-import-export-management/scripts/cx_import_export_job.py get-export \
--bulk-export-job-id 300000000000002 \
--token-cache auto
Safety Rules
- Never print access tokens, refresh tokens, client secrets, or token-cache contents.
- Use
execute-approved-importfor import/UCM writes;--executegates only export and import-mapping creation. - Do not infer
ObjectCode,ImportMapping, orExportObjectwhen several CX objects could match the user's request; ask for the exact object code. - For import jobs, do not submit without either
ObjectCodeorImportMapping. - For import jobs, stage only the bytes verified against the protected approval;
existing
InputFileContentIdvalues alone cannot establish byte integrity. - Do not print base64 file payloads or SOAP envelopes because they contain the uploaded file content.
- Bind import credentials and requests to the selected standard Fusion
restBaseUrlorigin; reject redirects to other configured service origins.
Final Response
Report the target operation, endpoint, job name, UCM content ID when uploaded, returned job identifier, whether the job was activated, export download path when downloaded, and the last polled status if polling was requested.