Skip to content

sync_accounts store dispatch should preserve push_notification_config #794

@bokelley

Description

@bokelley

SalesAgent's e2e implementation found that PlatformHandler.sync_accounts currently calls AccountStore.upsert with only params.accounts. That drops request-level sync_accounts fields before a store implementation can see them, including push_notification_config.

Why this matters:

  • push_notification_config is where a buyer registers webhook delivery for later account/catalog changes.
  • The store needs the full SyncAccountsRequest, not only the account refs, to persist that registration.
  • Without this, a real MCP sync_accounts call appears successful but the webhook configuration is never registered.

Observed in SalesAgent while testing sync_accounts -> catalog/account webhook delivery e2e.

Suggested fix:

  • Preserve backward compatibility for existing AccountStore.upsert(accounts, ctx) implementations.
  • Add/recognize an optional full-request hook such as upsert_request(params, ctx), or otherwise pass the full SyncAccountsRequest through a new store interface.
  • Project the result back through the existing sync_accounts response projection.

Local workaround in SalesAgent: monkey-patch PlatformHandler.sync_accounts to call account_store.upsert_request(params, ctx) when present, falling back to SDK behavior otherwise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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