Skip to content

[HR Import] Add Groups selector RHP to Merge Link connection flow #90968

@twisterdotcom

Description

@twisterdotcom

Context

After a user completes Merge Link authentication, they need to choose which groups of employees from their HR tool to import employees from. This selector can be shown once we receieve the LinkedAccount.sync_completed webhook is received.

The pattern is to show an RHP after connection is complete, before the initial sync runs.

Image Image Image

Slack threads:

Finalized design

  1. After the connection is complete, we GET a list of Groups from Merge's /groups endpoint and show the name + type values in an RHP modal, where name is larger than the subtext type.
  2. If the customer backs out of this RHP, the connection card shows a GBR (green brick road) state, and the three-dot overflow menu shows "Complete setup" in place of "Sync now" to bring them back into the company selector.
  3. Only once the setup is complete (a company is selected, or "All companies" is chosen) will we attempt the initial employee sync.

Forward-looking note

Eventually this flow should support filtering by more than just "company" (e.g. department, location). The RHP should be designed with that extensibility in mind — for now it surfaces a single "Company" filter option, but the shell should accommodate more rows later.

Work required

  • Implement the company selector RHP in the connection flow (after Merge Link callback, before initial sync trigger), pulling available companies from Merge's /companies endpoint
  • Admin selects a single company or "All companies" ("All companies" = sync all employees regardless of company, so pass no companyID to Merge); store selection in connection config and pass to MergeSyncJob as an optional filter
  • Implement the incomplete-setup GBR state on the connection card and swap "Sync now" → "Complete setup" in the three-dot menu until a company (or "All companies") has been selected

Parent project

Part of: https://github.com/Expensify/expensify/issues/604194

Metadata

Metadata

Assignees

No one assigned

    Labels

    EngineeringInternalRequires API changes or must be handled by Expensify staffWeeklyKSv2

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions