Skip to content

Salesforce ITR Workbench

Salesforce ITR list, detail, run-plan, queue, evidence, materialization, workbook validation, and remediation routes.

Owner: Salesforce ITR backend

Source Modules

  • scripts/serve_client_portal.py
  • LeafEnterprise/salesforce_it_requests/

Endpoint Summary

Method Path Summary Auth Handler
GET /api/ops/it-requests/export-workbooks Exports a batch workbook package for eligible ITRs. trusted frontend proxy _handle_it_request_export_workbooks
GET /api/ops/it-requests/open-workbench Returns cached, paginated Salesforce ITR workbench rows. trusted frontend proxy _handle_it_request_open_workbench
POST /api/ops/it-requests/queue-runs/execute Executes bulk queueing for eligible ITR run plans. trusted frontend proxy _handle_it_request_queue_run_batch_execute
POST /api/ops/it-requests/queue-runs/preview Previews bulk queueing for ready ITR run plans. trusted frontend proxy _handle_it_request_queue_run_batch_preview
POST /api/ops/it-requests/sync/full-mirror Starts or executes the full Salesforce ITR mirror sync. trusted frontend proxy _handle_it_request_full_mirror_sync
GET /api/ops/it-requests/{request_number} Returns the detail drawer payload for one ITR. trusted frontend proxy _handle_it_request_workbench_detail
GET /api/ops/it-requests/{request_number}/evidence-bundle Returns sanitized Salesforce ITR evidence bundle. trusted frontend proxy _handle_it_request_evidence_bundle
POST /api/ops/it-requests/{request_number}/evidence-refresh Materializes Salesforce files, extracts text, persists chunks, and optionally uploads search documents. trusted frontend proxy _handle_it_request_evidence_refresh
GET /api/ops/it-requests/{request_number}/export-workbook Exports the governed workbook for one ITR when exact scope lineage is valid. trusted frontend proxy _handle_it_request_export_workbook
POST /api/ops/it-requests/{request_number}/queue-run Queues one exact governed savings/audit run from an ITR run plan. trusted frontend proxy _handle_it_request_queue_run
GET /api/ops/it-requests/{request_number}/remediation-log Returns remediation/outcome history for an ITR. trusted frontend proxy _handle_it_request_remediation_log
POST /api/ops/it-requests/{request_number}/remediation-log Records an operator remediation or routing outcome for an ITR. trusted frontend proxy _handle_it_request_record_remediation
POST /api/ops/it-requests/{request_number}/run-plan Resolves capability lane, exact scope candidates, blockers, and queueability for an ITR. trusted frontend proxy _handle_it_request_run_plan
GET /api/ops/it-requests/{request_number}/search-documents Returns Azure AI Search / Foundry IQ-ready search documents for an ITR. trusted frontend proxy _handle_it_request_search_documents
POST /api/ops/it-requests/{request_number}/validate-workbook Validates workbook readiness for an ITR-governed export. trusted frontend proxy _handle_it_request_validate_workbook

Endpoint Details

GET /api/ops/it-requests/export-workbooks

Exports a batch workbook package for eligible ITRs.

Property Value
Handler _handle_it_request_export_workbooks
Auth trusted frontend proxy
Cache none
Status codes 200, 400, 401, 409, 500

Query parameters: request_numbers

Body fields: none

Response sections: application/zip

Tests / smoke paths: tests/test_report_workbook.py

Notes: Only exact eligible scopes should be included.

Semantic Retrieval Hints

  • Stable endpoint id: GET /api/ops/it-requests/export-workbooks
  • Route family: itr-workbench
  • Source handler: _handle_it_request_export_workbooks
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.

GET /api/ops/it-requests/open-workbench

Returns cached, paginated Salesforce ITR workbench rows.

Property Value
Handler _handle_it_request_open_workbench
Auth trusted frontend proxy
Cache route cache with refresh bypass
Status codes 200, 401, 500

Query parameters: page, page_size, search, lane, status, refresh

Body fields: none

Response sections: rows, pagination, filter_options, cache

Tests / smoke paths: tests/test_salesforce_it_request_full_mirror.py, scripts/smoke_client_portal.py

Notes: UI should treat rows as the server-authoritative filtered slice.

Semantic Retrieval Hints

  • Stable endpoint id: GET /api/ops/it-requests/open-workbench
  • Route family: itr-workbench
  • Source handler: _handle_it_request_open_workbench
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.

POST /api/ops/it-requests/queue-runs/execute

Executes bulk queueing for eligible ITR run plans.

Property Value
Handler _handle_it_request_queue_run_batch_execute
Auth trusted frontend proxy
Cache none
Status codes 200, 202, 400, 401, 409, 500

Query parameters: none

Body fields: filters, request_numbers, preview_token

Response sections: queued, blocked, results

Tests / smoke paths: scripts/smoke_client_portal.py

Notes: Should preserve per-request blocker details.

Semantic Retrieval Hints

  • Stable endpoint id: POST /api/ops/it-requests/queue-runs/execute
  • Route family: itr-workbench
  • Source handler: _handle_it_request_queue_run_batch_execute
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.

POST /api/ops/it-requests/queue-runs/preview

Previews bulk queueing for ready ITR run plans.

Property Value
Handler _handle_it_request_queue_run_batch_preview
Auth trusted frontend proxy
Cache none
Status codes 200, 400, 401, 500

Query parameters: none

Body fields: filters, request_numbers

Response sections: preview, eligible, blocked

Tests / smoke paths: scripts/smoke_client_portal.py

Notes: Preview before mutating queue state.

Semantic Retrieval Hints

  • Stable endpoint id: POST /api/ops/it-requests/queue-runs/preview
  • Route family: itr-workbench
  • Source handler: _handle_it_request_queue_run_batch_preview
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.

POST /api/ops/it-requests/sync/full-mirror

Starts or executes the full Salesforce ITR mirror sync.

Property Value
Handler _handle_it_request_full_mirror_sync
Auth trusted frontend proxy
Cache none
Status codes 200, 202, 400, 401, 500

Query parameters: none

Body fields: dry_run, limit, since

Response sections: status, sync_run_id, counts, blockers

Tests / smoke paths: tests/test_salesforce_it_request_full_mirror.py

Notes: Requires backend Salesforce and Azure SQL bindings.

Semantic Retrieval Hints

  • Stable endpoint id: POST /api/ops/it-requests/sync/full-mirror
  • Route family: itr-workbench
  • Source handler: _handle_it_request_full_mirror_sync
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.

GET /api/ops/it-requests/{request_number}

Returns the detail drawer payload for one ITR.

Property Value
Handler _handle_it_request_workbench_detail
Auth trusted frontend proxy
Cache route cache with refresh bypass
Status codes 200, 401, 404, 500

Query parameters: refresh

Body fields: none

Response sections: request, history, artifacts, run_plan_summary, remediation

Tests / smoke paths: scripts/smoke_client_portal.py

Notes: Detail loads should not depend on the open-workbench list request.

Semantic Retrieval Hints

  • Stable endpoint id: GET /api/ops/it-requests/{request_number}
  • Route family: itr-workbench
  • Source handler: _handle_it_request_workbench_detail
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.

GET /api/ops/it-requests/{request_number}/evidence-bundle

Returns sanitized Salesforce ITR evidence bundle.

Property Value
Handler _handle_it_request_evidence_bundle
Auth trusted frontend proxy
Cache none
Status codes 200, 401, 404, 500

Query parameters: none

Body fields: none

Response sections: request, counts, evidence_sources, search_documents

Tests / smoke paths: tests/test_salesforce_it_request_full_mirror.py

Notes: Raw Salesforce body URLs and credentials stay backend-only.

Semantic Retrieval Hints

  • Stable endpoint id: GET /api/ops/it-requests/{request_number}/evidence-bundle
  • Route family: itr-workbench
  • Source handler: _handle_it_request_evidence_bundle
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.

POST /api/ops/it-requests/{request_number}/evidence-refresh

Materializes Salesforce files, extracts text, persists chunks, and optionally uploads search documents.

Property Value
Handler _handle_it_request_evidence_refresh
Auth trusted frontend proxy
Cache none
Status codes 200, 202, 400, 401, 404, 500

Query parameters: none

Body fields: upload_adls, upload_search, limit

Response sections: status, materialized_files, extracted_chunks, search_upload

Tests / smoke paths: tests/test_salesforce_it_request_full_mirror.py

Notes: Backend-only source body retrieval.

Semantic Retrieval Hints

  • Stable endpoint id: POST /api/ops/it-requests/{request_number}/evidence-refresh
  • Route family: itr-workbench
  • Source handler: _handle_it_request_evidence_refresh
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.

GET /api/ops/it-requests/{request_number}/export-workbook

Exports the governed workbook for one ITR when exact scope lineage is valid.

Property Value
Handler _handle_it_request_export_workbook
Auth trusted frontend proxy
Cache none
Status codes 200, 400, 401, 404, 409, 500

Query parameters: selected_scope_key, selected_scope_kind

Body fields: none

Response sections: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Tests / smoke paths: tests/test_report_workbook.py

Notes: Reject ambiguous or drifted ITR-to-scope lineage.

Semantic Retrieval Hints

  • Stable endpoint id: GET /api/ops/it-requests/{request_number}/export-workbook
  • Route family: itr-workbench
  • Source handler: _handle_it_request_export_workbook
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.

POST /api/ops/it-requests/{request_number}/queue-run

Queues one exact governed savings/audit run from an ITR run plan.

Property Value
Handler _handle_it_request_queue_run
Auth trusted frontend proxy
Cache none
Status codes 200, 202, 400, 401, 404, 409, 500

Query parameters: none

Body fields: selected_scope_key, selected_scope_kind

Response sections: status, queued_requests, selected_scope, handoff

Tests / smoke paths: tests/test_salesforce_it_request_full_mirror.py

Notes: Reject missing or ambiguous exact scope.

Semantic Retrieval Hints

  • Stable endpoint id: POST /api/ops/it-requests/{request_number}/queue-run
  • Route family: itr-workbench
  • Source handler: _handle_it_request_queue_run
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.

GET /api/ops/it-requests/{request_number}/remediation-log

Returns remediation/outcome history for an ITR.

Property Value
Handler _handle_it_request_remediation_log
Auth trusted frontend proxy
Cache none
Status codes 200, 401, 404, 500

Query parameters: none

Body fields: none

Response sections: events, outcomes

Tests / smoke paths: scripts/smoke_client_portal.py

Notes: Keeps operator decisions visible for later triage.

Semantic Retrieval Hints

  • Stable endpoint id: GET /api/ops/it-requests/{request_number}/remediation-log
  • Route family: itr-workbench
  • Source handler: _handle_it_request_remediation_log
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.

POST /api/ops/it-requests/{request_number}/remediation-log

Records an operator remediation or routing outcome for an ITR.

Property Value
Handler _handle_it_request_record_remediation
Auth trusted frontend proxy
Cache none
Status codes 200, 201, 400, 401, 404, 500

Query parameters: none

Body fields: outcome, notes, next_step, lane

Response sections: status, event

Tests / smoke paths: scripts/smoke_client_portal.py

Notes: Should use proxied identity when available.

Semantic Retrieval Hints

  • Stable endpoint id: POST /api/ops/it-requests/{request_number}/remediation-log
  • Route family: itr-workbench
  • Source handler: _handle_it_request_record_remediation
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.

POST /api/ops/it-requests/{request_number}/run-plan

Resolves capability lane, exact scope candidates, blockers, and queueability for an ITR.

Property Value
Handler _handle_it_request_run_plan
Auth trusted frontend proxy
Cache none
Status codes 200, 400, 401, 404, 409, 500

Query parameters: none

Body fields: selected_scope_key, selected_scope_kind

Response sections: resolution_state, resolution_category, candidate_scopes, queue_allowed, blocking_reason_codes

Tests / smoke paths: tests/test_salesforce_it_request_full_mirror.py

Notes: Ambiguous or pair-level scopes must surface resolve_in_savings instead of queue-ready.

Semantic Retrieval Hints

  • Stable endpoint id: POST /api/ops/it-requests/{request_number}/run-plan
  • Route family: itr-workbench
  • Source handler: _handle_it_request_run_plan
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.

GET /api/ops/it-requests/{request_number}/search-documents

Returns Azure AI Search / Foundry IQ-ready search documents for an ITR.

Property Value
Handler _handle_it_request_search_documents
Auth trusted frontend proxy
Cache none
Status codes 200, 401, 404, 500

Query parameters: none

Body fields: none

Response sections: index_name, documents, counts

Tests / smoke paths: tests/test_salesforce_it_request_full_mirror.py

Notes: Documents should be extracted, hashed, request-scoped evidence, not raw links.

Semantic Retrieval Hints

  • Stable endpoint id: GET /api/ops/it-requests/{request_number}/search-documents
  • Route family: itr-workbench
  • Source handler: _handle_it_request_search_documents
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.

POST /api/ops/it-requests/{request_number}/validate-workbook

Validates workbook readiness for an ITR-governed export.

Property Value
Handler _handle_it_request_validate_workbook
Auth trusted frontend proxy
Cache none
Status codes 200, 400, 401, 404, 409, 500

Query parameters: none

Body fields: selected_scope_key, selected_scope_kind

Response sections: status, validation_notes, workbook_export

Tests / smoke paths: tests/test_report_workbook.py

Notes: Use explicit blocked states for scope/evidence gaps.

Semantic Retrieval Hints

  • Stable endpoint id: POST /api/ops/it-requests/{request_number}/validate-workbook
  • Route family: itr-workbench
  • Source handler: _handle_it_request_validate_workbook
  • Secrets and raw source URLs must remain backend-only unless this endpoint explicitly documents otherwise.