Skip to content

improvement(gong): validate integration against API docs, fix pagination/wandConfig consistency#5361

Open
waleedlatif1 wants to merge 110 commits into
stagingfrom
worktree-gong-validate-integration
Open

improvement(gong): validate integration against API docs, fix pagination/wandConfig consistency#5361
waleedlatif1 wants to merge 110 commits into
stagingfrom
worktree-gong-validate-integration

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Ran a full /validate-integration pass on the Gong integration (20 tools + block + registry entries) against Gong's live API docs
  • No critical or correctness bugs found — every endpoint, method, auth pattern, and response mapping checked out clean
  • Fixed minor consistency issues: marked cursor output optional: true on aggregate_activity/interaction_stats/list_flows (matching list_calls convention), added wandConfig to comma-separated ID fields (callIds, primaryUserIds, userIds, scorecardIds, reviewedUserIds)
  • Investigated adding Gong's Data Privacy erase endpoints and Engage Flow prospect-assignment endpoints (identified as high-value gaps) but could not verify their exact wire-level field names/schema against authoritative docs (Gong's interactive Swagger reference is behind an authenticated session) — deliberately left out rather than guess field names

Type of Change

  • Improvement

Testing

Tested manually — bun run lint and tsc --noEmit both clean

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

waleedlatif1 and others added 30 commits April 3, 2026 23:30
…ership workflow edits via sockets, ui improvements
…ration, signup method feature flags, SSO improvements
* feat(posthog): Add tracking on mothership abort (#4023)

Co-authored-by: Theodore Li <theo@sim.ai>

* fix(login): fix captcha headers for manual login  (#4025)

* fix(signup): fix turnstile key loading

* fix(login): fix captcha header passing

* Catch user already exists, remove login form captcha
…nts, secrets performance, polling refactors, drag resources in mothership
…endar triggers, docs updates, integrations/models pages improvements
…mat, logs performance improvements

fix(csp): add missing analytics domains, remove unsafe-eval, fix workspace CSP gap (#4179)
fix(landing): return 404 for invalid dynamic route slugs (#4182)
improvement(seo): optimize sitemaps, robots.txt, and core web vitals across sim and docs (#4170)
fix(gemini): support structured output with tools on Gemini 3 models (#4184)
feat(brightdata): add Bright Data integration with 8 tools (#4183)
fix(mothership): fix superagent credentials (#4185)
fix(logs): close sidebar when selected log disappears from filtered list; cleanup (#4186)
v0.6.46: mothership streaming fixes, brightdata integration
waleedlatif1 and others added 25 commits June 2, 2026 20:11
…dgebase connector, SSO provider ID allowlist, singleton memory leak fix
…ration, smooth streaming, security hardening, db fixes
…x, db migrations from ci, docs updates, read replicas

v0.7.3: jira oauth scope fix, read-replica client, table wire data fix, db migrations from ci, docs updates, read replicas
…uting, trigger.dev, temporal, latex, quartr, brex, convex integrations
…richment providers, deepseek models, db performance
…nce, file sharing, scheduled tasks granularity
…t harness, sakana fugu provider

v0.7.13: pii redaction, react query frontend refactor, pi coding agent harness, sakana fugu provider
…ix, settings overhaul, thrive learning integration
…extension, workspace forking, slack trigger extension, new README
…to ID list fields

- mark cursor output optional:true on aggregate_activity, interaction_stats, list_flows for consistency with list_calls
- add wandConfig to comma-separated ID fields (callIds, primaryUserIds, userIds, scorecardIds, reviewedUserIds) matching repo convention for CSV inputs
@cursor

cursor Bot commented Jul 2, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI/metadata-only changes to Gong block wand helpers and tool output schemas; no API request or auth logic changes.

Overview
This PR tightens Gong workflow UX and tool metadata after an API-docs validation pass.

The Gong block now enables wand (AI-assisted fill) on comma-separated ID inputs—callIds, primaryUserIds, userIds, scorecardIds, and reviewedUserIds—with prompts that return only the ID list, matching patterns already used on date/timestamp fields.

Three paginated tools—aggregate activity, interaction stats, and list flows—mark the cursor output as optional: true, aligning with other Gong list tools (e.g. list_users) when the API omits a next-page cursor.

Reviewed by Cursor Bugbot for commit 77b3a2b. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR makes two targeted consistency improvements to the Gong integration: it marks the cursor output field as optional: true in three tool definitions (aggregate_activity, interaction_stats, list_flows) to match the existing convention in list_calls, and it adds wandConfig AI-assist blocks to five comma-separated ID input fields (callIds, primaryUserIds, userIds, scorecardIds, reviewedUserIds) in the block config.

  • Cursor optionality fix: The cursor field is only present in paginated responses when more pages exist; marking it optional: true in the three tools aligns them with list_calls and correctly reflects the Gong API contract.
  • wandConfig additions: Five ID input fields receive the same AI-assist prompting pattern already used by other fields in the block, enabling users to describe IDs in natural language rather than typing raw values.

Confidence Score: 5/5

Safe to merge — all changes are additive consistency fixes with no behavioral risk.

The three tool files only add optional: true to an already-existing cursor output field, correctly reflecting that Gong omits the cursor on the final page. The block file additions are pure UI config (wandConfig) that mirror patterns already in use throughout the same file. No logic, auth, or data-flow paths are touched.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/gong.ts Adds wandConfig AI-assist blocks to five comma-separated ID input fields (callIds, primaryUserIds, userIds, scorecardIds, reviewedUserIds), consistent with the pattern already used for other inputs in this block.
apps/sim/tools/gong/aggregate_activity.ts Adds optional: true to the cursor output field, matching the convention in list_calls; no logic change.
apps/sim/tools/gong/interaction_stats.ts Adds optional: true to the cursor output field; identical fix to aggregate_activity.
apps/sim/tools/gong/list_flows.ts Adds optional: true to the cursor output field; identical fix to aggregate_activity and interaction_stats.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant User
    participant Block as Gong Block (gong.ts)
    participant Tool as Gong Tool (e.g. aggregate_activity)
    participant API as Gong API

    User->>Block: Provide ID field input (wandConfig AI-assist)
    Block->>Tool: Execute with params (callIds / userIds / etc.)
    Tool->>API: POST /v2/... with comma-separated IDs
    API-->>Tool: Response with records + optional cursor
    Note over Tool: cursor: optional: true (absent on last page)
    alt More pages exist
        Tool-->>Block: records + cursor
        Block-->>User: Results + cursor for next page
    else Last page
        Tool-->>Block: records (no cursor)
        Block-->>User: Results only
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant User
    participant Block as Gong Block (gong.ts)
    participant Tool as Gong Tool (e.g. aggregate_activity)
    participant API as Gong API

    User->>Block: Provide ID field input (wandConfig AI-assist)
    Block->>Tool: Execute with params (callIds / userIds / etc.)
    Tool->>API: POST /v2/... with comma-separated IDs
    API-->>Tool: Response with records + optional cursor
    Note over Tool: cursor: optional: true (absent on last page)
    alt More pages exist
        Tool-->>Block: records + cursor
        Block-->>User: Results + cursor for next page
    else Last page
        Tool-->>Block: records (no cursor)
        Block-->>User: Results only
    end
Loading

Reviews (1): Last reviewed commit: "improvement(gong): tighten pagination op..." | Re-trigger Greptile

contentSelector.context/contextTiming were never set on the /v2/calls/extensive
request, so the documented context (CRM/external-system links) output was
silently always empty even though the field is declared in the tool's outputs.
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 2, 2026 4:07pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants