Skip to content

R3 Sandbox: Add 'Connect to Certinia Sandbox' option #89443

@yuwenmemon

Description

@yuwenmemon

Parent: Expensify/Expensify#589894
Design doc: https://docs.google.com/document/d/1qQXU4EIij-OyCpk6z8idi0ch0rP4XtIQ0770STZeF5E/edit

Scope

Add "Connect to Certinia Sandbox" as a third option in the Connect menu. The prerequisites flow and OAuth endpoint differ for sandbox; the rest of the configuration UI — Import, Export, Advanced — is identical to production and is unchanged.

The route already includes /:isSandbox? from Release 1, and CertiniaPrerequisitesPage.tsx already conditionally shows sandbox bundle URLs. The work here is just adding the popover entry and the translation key.

Implementation notes (from design doc)

1. POLICY_ACCOUNTING_CERTINIA_PREREQUISITES route in src/ROUTES.ts

Confirm getRoute accepts isSandbox?: boolean as the second argument and encodes it in the path:

getRoute: (policyID: string, isSandbox = false, backTo?: string) =>
    getUrlWithBackToParam(
        `workspaces/${policyID}/accounting/certinia/prerequisites/${isSandbox}` as const,
        backTo
    ),

CertiniaPrerequisitesPage.tsx already reads isSandbox from route params and shows sandbox bundle URLs conditionally — no page changes needed. getFinancialForceSetupLink(policyID, isSandbox) (or the equivalent connect call) already receives the flag.

2. src/components/ConnectToCertiniaFlow/index.tsx — Add third popover option

Add "Connect to Certinia Sandbox" as the second menu item (between "Connect" and "Reuse"):

{
    text: translate('workspace.certinia.prerequisites.connectSandboxButton'),
    onSelected: () =>
        Navigation.navigate(ROUTES.POLICY_ACCOUNTING_CERTINIA_PREREQUISITES.getRoute(policyID, true)),
},

3. src/languages/en.ts — Add sandbox translation key

certinia.prerequisites.connectSandboxButton = 'Connect to Certinia Sandbox'

Stub the corresponding entry in es.ts.

Tests (Release 3 verification)

  1. Connect menu shows all three options: "Connect to Certinia", "Connect to Certinia Sandbox", "Reuse existing connection".
  2. "Connect to Certinia Sandbox" navigates to prerequisites with isSandbox=true — Step 1 shows sandbox-specific bundle links.
  3. OAuth in Step 3 targets the Salesforce sandbox endpoint (validated by the backend FinancialForce::connectPolicy($authToken, $policyID, true)).
  4. Production "Connect to Certinia" flow unchanged.
Issue OwnerCurrent Issue Owner: @ChavdaSachin

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions