Skip to content

Commit 5536549

Browse files
authored
fix(integrations): resolve agent tool-call operations and align remaining requests with vendor specs (#10036)
* fix(integrations): resolve the operation from the tool-call context in the ClickUp, Airtable, Asana, monday, SAP S/4HANA, and Workday mappers * fix(integrations): align Mailchimp, Attio, HubSpot, Zendesk, Supabase, and ServiceNow requests and outputs with their API specs * fix(integrations): stop update dropdowns overwriting Pipedrive and Intercom fields, send documented Intercom, Square, Amplitude, and Box request values, and correct SAP output types * fix(integrations): keep Mailchimp Update Audience behavior as on main, throw on invalid Attio entry values, and guard the ServiceNow CI class path * fix(square): keep sending an unset autocomplete as on main * chore(docs): regenerate integration docs, catalog, and tool metadata * fix(integrations): keep a zero SAP top/skip and fall back consistently for the monday column value * fix(integrations): accept the No change dropdown value without block context, document the legacy Mailchimp landing page type, and type the ServiceNow path tests * fix(integrations): reset the shared Pipedrive status and Intercom role dropdowns when the operation changes
1 parent 69bfb1b commit 5536549

80 files changed

Lines changed: 638 additions & 162 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/docs/content/docs/integrations/amplitude.mdx‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ Get a user profile including properties, cohort memberships, and computed proper
194194
| `deviceId` | string | Device ID |
195195
| `ampProps` | json | Amplitude user properties \(library, first_used, last_used, custom properties\) |
196196
| `cohortIds` | array | List of cohort IDs the user belongs to |
197-
| `computations` | json | Computed user properties |
197+
| `computations` | json | Computed user properties when Amplitude returns them under a computations key; computed values are otherwise returned within ampProps |
198198

199199
</ReferenceDetails>
200200

@@ -352,17 +352,17 @@ Analyze conversion rates and drop-off between a sequence of events.
352352
| `interval` | string | No | Time interval: -300000 \(real-time\), -3600000 \(hourly\), 1 \(daily\), 7 \(weekly\), or 30 \(monthly\) |
353353
| `conversionWindowSeconds` | string | No | Conversion window in seconds \(default: 2592000, i.e. 30 days\) |
354354
| `groupBy` | string | No | Property to group by \(limit: one; prefix custom properties with "gp:"\) |
355-
| `limit` | string | No | Maximum number of group-by values \(default: 100, max: 1000\) |
355+
| `limit` | string | No | Maximum number of group-by values \(default and max: 1000\) |
356356
| `segment` | string | No | JSON segment definition\(s\) applied to the query |
357357

358358
#### Output
359359

360360
| Parameter | Type | Description |
361361
| --------- | ---- | ----------- |
362362
| `funnels` | array | Funnel results, one entry per segment |
363-
| ↳ `stepByStep` | json | Conversion count at each step |
364-
| ↳ `cumulative` | json | Cumulative conversion percentage at each step |
365-
| ↳ `cumulativeRaw` | json | Cumulative conversion count at each step |
363+
| ↳ `stepByStep` | json | Fraction of users from the previous step who completed each step |
364+
| ↳ `cumulative` | json | Fraction of total users who completed each step |
365+
| ↳ `cumulativeRaw` | json | Number of users who completed each step |
366366
| ↳ `medianTransTimes` | json | Median transition time between steps \(ms\) |
367367
| ↳ `avgTransTimes` | json | Average transition time between steps \(ms\) |
368368
| ↳ `events` | json | Event names for each funnel step |
@@ -384,8 +384,8 @@ Measure how many users return to perform an action after a starting action.
384384
| `returnEvent` | string | Yes | JSON returning event object, e.g. \{"event_type":"_all"\} or \{"event_type":"_active"\} |
385385
| `start` | string | Yes | Start date in YYYYMMDD format |
386386
| `end` | string | Yes | End date in YYYYMMDD format |
387-
| `retentionMode` | string | No | Retention type: "bracket", "rolling", or "n-day" \(default: n-day\) |
388-
| `retentionBrackets` | string | No | Required when Retention Mode is "bracket". Day ranges, e.g. \[\[0,4\]\] |
387+
| `retentionMode` | string | No | Retention type: "n-day" \(sent as nday\), "rolling", "bracket", or "nday_or_before" \(default: n-day\) |
388+
| `retentionBrackets` | string | No | Required when Retention Mode is "bracket". Day ranges with an exclusive end day, e.g. \[\[0,5\]\] for Day 0 to Day 4 |
389389
| `interval` | string | No | Time interval: 1 \(daily\), 7 \(weekly\), or 30 \(monthly\) |
390390
| `groupBy` | string | No | Property to group by \(limit: one; prefix custom properties with "gp:"\) |
391391
| `segment` | string | No | JSON segment definition\(s\) applied to the query |

‎apps/docs/content/docs/integrations/box.mdx‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ Create a new Box Sign request to send documents for e-signature
374374
| Parameter | Type | Description |
375375
| --------- | ---- | ----------- |
376376
| `id` | string | Sign request ID |
377-
| `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, expired, error_converting, error_sending, finalizing, error_finalizing\) |
377+
| `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, error, error_converting, error_sending, expired, finalizing, error_finalizing\) |
378378
| `name` | string | Sign request name |
379379
| `shortId` | string | Human-readable short ID |
380380
| `signers` | array | List of signers |
@@ -387,7 +387,7 @@ Create a new Box Sign request to send documents for e-signature
387387
| `sourceFiles` | array | Source files for signing |
388388
| ↳ `id` | string | File ID |
389389
| ↳ `type` | string | File type |
390-
| ↳ `name` | string | File name |
390+
| ↳ `name` | string | File name \(Box Sign returns source files without a name, so this is usually empty\) |
391391
| `emailSubject` | string | Custom email subject line |
392392
| `emailMessage` | string | Custom email message body |
393393
| `daysValid` | number | Number of days the request is valid |
@@ -415,7 +415,7 @@ Get the details and status of a Box Sign request
415415
| Parameter | Type | Description |
416416
| --------- | ---- | ----------- |
417417
| `id` | string | Sign request ID |
418-
| `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, expired, error_converting, error_sending, finalizing, error_finalizing\) |
418+
| `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, error, error_converting, error_sending, expired, finalizing, error_finalizing\) |
419419
| `name` | string | Sign request name |
420420
| `shortId` | string | Human-readable short ID |
421421
| `signers` | array | List of signers |
@@ -428,7 +428,7 @@ Get the details and status of a Box Sign request
428428
| `sourceFiles` | array | Source files for signing |
429429
| ↳ `id` | string | File ID |
430430
| ↳ `type` | string | File type |
431-
| ↳ `name` | string | File name |
431+
| ↳ `name` | string | File name \(Box Sign returns source files without a name, so this is usually empty\) |
432432
| `emailSubject` | string | Custom email subject line |
433433
| `emailMessage` | string | Custom email message body |
434434
| `daysValid` | number | Number of days the request is valid |
@@ -458,7 +458,7 @@ List all Box Sign requests
458458
| --------- | ---- | ----------- |
459459
| `signRequests` | array | List of sign requests |
460460
| ↳ `id` | string | Sign request ID |
461-
| ↳ `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, expired, error_converting, error_sending, finalizing, error_finalizing\) |
461+
| ↳ `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, error, error_converting, error_sending, expired, finalizing, error_finalizing\) |
462462
| ↳ `name` | string | Sign request name |
463463
| ↳ `shortId` | string | Human-readable short ID |
464464
| ↳ `signers` | array | List of signers |
@@ -471,7 +471,7 @@ List all Box Sign requests
471471
| ↳ `sourceFiles` | array | Source files for signing |
472472
| ↳ `id` | string | File ID |
473473
| ↳ `type` | string | File type |
474-
| ↳ `name` | string | File name |
474+
| ↳ `name` | string | File name \(Box Sign returns source files without a name, so this is usually empty\) |
475475
| ↳ `emailSubject` | string | Custom email subject line |
476476
| ↳ `emailMessage` | string | Custom email message body |
477477
| ↳ `daysValid` | number | Number of days the request is valid |
@@ -501,7 +501,7 @@ Cancel a pending Box Sign request
501501
| Parameter | Type | Description |
502502
| --------- | ---- | ----------- |
503503
| `id` | string | Sign request ID |
504-
| `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, expired, error_converting, error_sending, finalizing, error_finalizing\) |
504+
| `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, error, error_converting, error_sending, expired, finalizing, error_finalizing\) |
505505
| `name` | string | Sign request name |
506506
| `shortId` | string | Human-readable short ID |
507507
| `signers` | array | List of signers |
@@ -514,7 +514,7 @@ Cancel a pending Box Sign request
514514
| `sourceFiles` | array | Source files for signing |
515515
| ↳ `id` | string | File ID |
516516
| ↳ `type` | string | File type |
517-
| ↳ `name` | string | File name |
517+
| ↳ `name` | string | File name \(Box Sign returns source files without a name, so this is usually empty\) |
518518
| `emailSubject` | string | Custom email subject line |
519519
| `emailMessage` | string | Custom email message body |
520520
| `daysValid` | number | Number of days the request is valid |

‎apps/docs/content/docs/integrations/mailchimp.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Update an existing audience (list) in Mailchimp
115115
| `audienceName` | string | No | The name of the audience/list \(e.g., "Newsletter Subscribers"\) |
116116
| `permissionReminder` | string | No | Permission reminder text shown to subscribers \(e.g., "You signed up for updates on our website"\) |
117117
| `campaignDefaults` | string | No | JSON object of default campaign settings \(e.g., \{"from_name": "Acme", "from_email": "news@acme.com"\}\) |
118-
| `emailTypeOption` | string | No | Support multiple email formats: "true" or "false" |
118+
| `emailTypeOption` | string | No | Support multiple email formats: "true" or "false". Omit to leave it unchanged |
119119

120120
#### Output
121121

@@ -1627,7 +1627,7 @@ Create a new landing page in Mailchimp
16271627

16281628
| Parameter | Type | Required | Description |
16291629
| --------- | ---- | -------- | ----------- |
1630-
| `landingPageType` | string | Yes | The type of landing page: "signup" |
1630+
| `landingPageType` | string | Yes | The type of landing page: "signup" or "product" \("click-through" is kept for saved workflows but is not in the current API\) |
16311631
| `landingPageTitle` | string | No | The title of the landing page \(e.g., "Join Our Newsletter"\) |
16321632

16331633
#### Output

‎apps/docs/content/docs/integrations/sap_s4hana.mdx‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ List suppliers from SAP S/4HANA Cloud (API_BUSINESS_PARTNER, A_Supplier) with op
435435
| ↳ `InternationalLocationNumber1` | string | International location number, part 1 |
436436
| ↳ `InternationalLocationNumber2` | string | International location number, part 2 |
437437
| ↳ `InternationalLocationNumber3` | string | International location number, part 3 |
438-
| ↳ `IsNaturalPerson` | boolean | Indicates whether the supplier is a natural person |
438+
| ↳ `IsNaturalPerson` | string | Indicates whether the supplier is a natural person |
439439
| ↳ `PaymentIsBlockedForSupplier` | boolean | Payment block flag |
440440
| ↳ `PostingIsBlocked` | boolean | Posting block flag |
441441
| ↳ `PurchasingIsBlocked` | boolean | Purchasing block flag |
@@ -504,7 +504,7 @@ Retrieve a single supplier by Supplier key from SAP S/4HANA Cloud (API_BUSINESS_
504504
| ↳ `InternationalLocationNumber1` | string | International location number, part 1 |
505505
| ↳ `InternationalLocationNumber2` | string | International location number, part 2 |
506506
| ↳ `InternationalLocationNumber3` | string | International location number, part 3 |
507-
| ↳ `IsNaturalPerson` | boolean | Indicates whether the supplier is a natural person |
507+
| ↳ `IsNaturalPerson` | string | Indicates whether the supplier is a natural person |
508508
| ↳ `PaymentIsBlockedForSupplier` | boolean | Payment block flag |
509509
| ↳ `PostingIsBlocked` | boolean | Posting block flag |
510510
| ↳ `PurchasingIsBlocked` | boolean | Purchasing block flag |
@@ -811,7 +811,7 @@ List outbound deliveries from SAP S/4HANA Cloud (API_OUTBOUND_DELIVERY_SRV;v=000
811811
| `tokenUrl` | string | No | OAuth token URL \(Cloud Private / On-Premise + OAuth\) |
812812
| `username` | string | No | Username for HTTP Basic auth |
813813
| `password` | string | No | Password for HTTP Basic auth |
814-
| `filter` | string | No | OData $filter expression \(e.g., "OverallDeliveryStatus eq 'C'"\) |
814+
| `filter` | string | No | OData $filter expression \(e.g., "OverallGoodsMovementStatus eq 'C'"\) |
815815
| `top` | number | No | Maximum results to return \($top\) |
816816
| `skip` | number | No | Number of results to skip \($skip\) |
817817
| `orderBy` | string | No | OData $orderby expression |
@@ -1366,7 +1366,7 @@ List material document headers (goods movements) from SAP S/4HANA Cloud (API_MAT
13661366
| ↳ `CreationDate` | string | Creation date \(OData /Date\(...\)/ string\) |
13671367
| ↳ `CreationTime` | string | Creation time \(OData PT...S string\) |
13681368
| ↳ `VersionForPrintingSlip` | string | Version for printing the goods movement slip |
1369-
| ↳ `ManualPrintIsTriggered` | boolean | Indicates whether manual print was triggered for this document |
1369+
| ↳ `ManualPrintIsTriggered` | string | Indicates whether manual print was triggered for this document |
13701370
| ↳ `CtrlPostgForExtWhseMgmtSyst` | string | Control posting for external warehouse management system |
13711371
| ↳ `to_MaterialDocumentItem` | json | Material document items \(only present when $expand=to_MaterialDocumentItem is supplied\) |
13721372

@@ -1415,7 +1415,7 @@ Retrieve a single material document header by composite key (MaterialDocument +
14151415
| ↳ `CreationDate` | string | Creation date \(OData /Date\(...\)/ string\) |
14161416
| ↳ `CreationTime` | string | Creation time \(OData PT...S string\) |
14171417
| ↳ `VersionForPrintingSlip` | string | Version for printing the goods movement slip |
1418-
| ↳ `ManualPrintIsTriggered` | boolean | Indicates whether manual print was triggered for this document |
1418+
| ↳ `ManualPrintIsTriggered` | string | Indicates whether manual print was triggered for this document |
14191419
| ↳ `CtrlPostgForExtWhseMgmtSyst` | string | Control posting for external warehouse management system |
14201420
| ↳ `to_MaterialDocumentItem` | json | Material document items \(only present when $expand=to_MaterialDocumentItem is supplied\) |
14211421

@@ -1457,7 +1457,7 @@ List purchase requisitions from SAP S/4HANA Cloud (API_PURCHASEREQ_PROCESS_SRV,
14571457
| ↳ `PurchaseRequisition` | string | Purchase requisition number |
14581458
| ↳ `PurchaseRequisitionType` | string | Purchase requisition document type \(e.g., NB\) |
14591459
| ↳ `PurReqnDescription` | string | Purchase requisition description |
1460-
| ↳ `SourceDetermination` | string | Source-of-supply determination flag |
1460+
| ↳ `SourceDetermination` | boolean | Source-of-supply determination flag |
14611461

14621462
</ReferenceDetails>
14631463

@@ -1494,7 +1494,7 @@ Retrieve a single purchase requisition by PurchaseRequisition key from SAP S/4HA
14941494
| ↳ `PurchaseRequisition` | string | Purchase requisition number |
14951495
| ↳ `PurchaseRequisitionType` | string | PR document type \(e.g., NB\) |
14961496
| ↳ `PurReqnDescription` | string | Purchase requisition description |
1497-
| ↳ `SourceDetermination` | string | Source-of-supply determination flag |
1497+
| ↳ `SourceDetermination` | boolean | Source-of-supply determination flag |
14981498
| ↳ `to_PurchaseReqnItem` | json | Expanded PR items \(when $expand=to_PurchaseReqnItem\) |
14991499

15001500
</ReferenceDetails>
@@ -1532,7 +1532,7 @@ Create a purchase requisition in SAP S/4HANA Cloud (API_PURCHASEREQ_PROCESS_SRV,
15321532
| ↳ `PurchaseRequisition` | string | Auto-assigned purchase requisition number |
15331533
| ↳ `PurchaseRequisitionType` | string | PR document type \(e.g., NB\) |
15341534
| ↳ `PurReqnDescription` | string | Purchase requisition description |
1535-
| ↳ `SourceDetermination` | string | Source-of-supply determination flag |
1535+
| ↳ `SourceDetermination` | boolean | Source-of-supply determination flag |
15361536
| ↳ `to_PurchaseReqnItem` | json | Created PR items returned in deep insert |
15371537

15381538
</ReferenceDetails>
@@ -1570,7 +1570,7 @@ Update fields on an A_PurchaseRequisitionHeader entity in SAP S/4HANA Cloud (API
15701570
| ↳ `PurchaseRequisition` | string | Purchase requisition number |
15711571
| ↳ `PurchaseRequisitionType` | string | PR document type |
15721572
| ↳ `PurReqnDescription` | string | Purchase requisition description |
1573-
| ↳ `SourceDetermination` | string | Source-of-supply determination flag |
1573+
| ↳ `SourceDetermination` | boolean | Source-of-supply determination flag |
15741574

15751575
</ReferenceDetails>
15761576

‎apps/docs/content/docs/integrations/supabase.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,8 @@ Move a file within a Supabase storage bucket
473473
| `message` | string | Operation status message |
474474
| `results` | object | Move operation result |
475475
| ↳ `message` | string | Operation status message |
476-
| ↳ `Id` | string | Identifier of the destination object |
477-
| ↳ `Key` | string | Full object key of the destination |
476+
| ↳ `Id` | string | Not returned by the move endpoint, which responds with only a message |
477+
| ↳ `Key` | string | Not returned by the move endpoint, which responds with only a message |
478478

479479
</ReferenceDetails>
480480

‎apps/sim/blocks/blocks/airtable.test.ts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,12 @@ describe('Airtable pagination offsets', () => {
116116
})
117117

118118
it('keeps the model offset on a List Records tool call', () => {
119-
const mapped = mapParams(
120-
{ ...baseParams, operation: 'list', offset: 'itrModel' },
121-
{ operation: 'list' }
122-
)
119+
const mapped = mapParams({ ...baseParams, offset: 'itrModel' }, { operation: 'list' })
123120
expect(mapped.offset).toBe('itrModel')
124121
})
122+
123+
it('maps an offset the user set on the tool when the operation arrives only on the context', () => {
124+
const mapped = mapParams({ ...baseParams, recordsOffset: 'itrUser' }, { operation: 'list' })
125+
expect(mapped.offset).toBe('itrUser')
126+
})
125127
})

‎apps/sim/blocks/blocks/airtable.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,8 @@ Return ONLY the valid JSON array of record ID strings - no explanations, no mark
428428
basesOffset,
429429
...rest
430430
} = params
431+
/** Agent tool calls carry the stored operation only on `context`, not in `params`. */
432+
const operation = params.operation ?? context?.operation
431433
let parsedRecords: unknown
432434
let parsedFields: unknown
433435
let parsedFieldsToMergeOn: unknown
@@ -440,24 +442,22 @@ Return ONLY the valid JSON array of record ID strings - no explanations, no mark
440442
try {
441443
if (
442444
records &&
443-
(params.operation === 'create' ||
444-
params.operation === 'updateMultiple' ||
445-
params.operation === 'upsert')
445+
(operation === 'create' || operation === 'updateMultiple' || operation === 'upsert')
446446
) {
447447
parsedRecords = parseJsonInput(records)
448448
}
449-
if (fields && params.operation === 'update') {
449+
if (fields && operation === 'update') {
450450
parsedFields = parseJsonInput(fields)
451451
}
452-
if (fieldsToMergeOn && params.operation === 'upsert') {
452+
if (fieldsToMergeOn && operation === 'upsert') {
453453
parsedFieldsToMergeOn = parseJsonInput(fieldsToMergeOn)
454454
}
455-
if (recordIds && params.operation === 'delete') {
455+
if (recordIds && operation === 'delete') {
456456
parsedRecordIds = parseJsonInput(recordIds)
457457
}
458458
} catch (error) {
459459
throw new Error(
460-
`Invalid JSON input for ${params.operation} operation: ${getErrorMessage(error)}`
460+
`Invalid JSON input for ${operation} operation: ${getErrorMessage(error)}`
461461
)
462462
}
463463

@@ -469,7 +469,7 @@ Return ONLY the valid JSON array of record ID strings - no explanations, no mark
469469
const typecastParams =
470470
typecast != null ? { typecast: typecast === true || typecast === 'true' } : {}
471471

472-
switch (params.operation) {
472+
switch (operation) {
473473
case 'list':
474474
return {
475475
...baseParams,

‎apps/sim/blocks/blocks/amplitude.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,7 @@ export const AmplitudeBlock: BlockConfig = {
940940
{ label: 'N-Day', id: 'n-day' },
941941
{ label: 'Rolling', id: 'rolling' },
942942
{ label: 'Bracket', id: 'bracket' },
943+
{ label: 'N-Day or Before', id: 'nday_or_before' },
943944
],
944945
value: () => 'n-day',
945946
condition: { field: 'operation', value: 'retention' },
@@ -949,7 +950,7 @@ export const AmplitudeBlock: BlockConfig = {
949950
id: 'retentionBrackets',
950951
title: 'Retention Brackets',
951952
type: 'short-input',
952-
placeholder: '[[0,4]] — required when Retention Mode is Bracket',
953+
placeholder: '[[0,5]] (end day exclusive) — required when Retention Mode is Bracket',
953954
condition: {
954955
field: 'operation',
955956
value: 'retention',

0 commit comments

Comments
 (0)