Skip to content

[Gusto] [Bug] Update GustoSyncResult to match IS payload shape from JOB_DONE event #90573

@yuwenmemon

Description

@yuwenmemon

Bug

After a Gusto sync, the App's connectionSyncProgress.result stays undefined because the IS doesn't currently emit the result on the JOB_DONE Pusher event for NewDot syncs — and the App's GustoSyncResult type doesn't match what's about to start being emitted.

The IS-side fix is in Expensify/Integration-Server#8948. Once merged, JOB_DONE Onyx events for Gusto syncs will carry a new result field:

{
  "timestamp": "...",
  "connectionName": "gusto",
  "stageInProgress": "jobDone",
  "result": {
    "addedEmployeesCount": 3,
    "removedEmployeesCount": 1,
    "skippedEmployees": [
      {"name": "Anu M", "id": "uuid-1", "reason": "Employee doesn't have an email address."}
    ]
  }
}

The App-side GustoSyncResult type currently models {added, removed, skipped} as arrays of user objects with emails. This needs to switch to counts for added/removed (just like Classic does) plus the detailed skipped list.

Proposed change

Update src/libs/API/GustoSyncResult.ts to:

type GustoSyncResult = {
    addedEmployeesCount?: number;
    removedEmployeesCount?: number;
    skippedEmployees?: Array<{name: string; id: string; reason: string}>;
};

…and update any rendering code that consumes the old {added, removed, skipped} shape to use counts for added/removed and the new skippedEmployees array shape (only the skipped list keeps per-employee details — same as Classic).

Steps to reproduce (after IS merge)

  1. On a Control workspace, connect Gusto via NewDot and trigger a sync (e.g. switch the approval mode).
  2. After the sync completes, the post-sync summary should show the added count, removed count, and a list of skipped employees with their reason.
  3. With the current GustoSyncResult type, the App ignores the payload because field names don't match what IS sends.

Parent

For https://github.com/Expensify/Expensify/issues/591910

Issue OwnerCurrent Issue Owner: @shubham1206agra
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022054682980734946047
  • Upwork Job ID: 2054682980734946047
  • Last Price Increase: 2026-05-13

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2

Type

No type
No fields configured for issues without a type.

Projects

Status

CRITICAL

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions