Skip to content

Commit 266a184

Browse files
committed
fix(integrations): stop update dropdowns overwriting Pipedrive and Intercom fields, send documented Intercom, Square, Amplitude, and Box request values, and correct SAP output types
1 parent 2349259 commit 266a184

34 files changed

Lines changed: 235 additions & 63 deletions

‎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/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/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',

‎apps/sim/blocks/blocks/box.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ export const BoxBlock = {
584584
case 'update_file':
585585
baseParams.fileId = rest.fileId
586586
if (rest.newName) baseParams.name = rest.newName
587-
if (rest.description !== undefined) baseParams.description = rest.description
587+
if (typeof rest.description === 'string') baseParams.description = rest.description
588588
if (rest.moveToFolderId) baseParams.parentFolderId = rest.moveToFolderId
589589
if (rest.tags) baseParams.tags = rest.tags
590590
break

‎apps/sim/blocks/blocks/intercom.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ export const IntercomBlock: BlockConfig = {
188188
id: 'role',
189189
title: 'Role',
190190
type: 'dropdown',
191-
options: [
191+
options: (params) => [
192+
...(params?.values.operation === 'update_contact' ? [{ label: 'No change', id: '' }] : []),
192193
{ label: 'Lead', id: 'lead' },
193194
{ label: 'User', id: 'user' },
194195
],

‎apps/sim/blocks/blocks/pipedrive.ts‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,12 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
282282
id: 'status',
283283
title: 'Status',
284284
type: 'dropdown',
285-
options: [
285+
options: (params) => [
286+
...(params?.values.operation === 'update_deal' ? [{ label: 'No change', id: '' }] : []),
286287
{ label: 'Open', id: 'open' },
287288
{ label: 'Won', id: 'won' },
288289
{ label: 'Lost', id: 'lost' },
289290
],
290-
value: () => 'open',
291291
condition: { field: 'operation', value: ['create_deal', 'update_deal'] },
292292
},
293293
{
@@ -581,7 +581,7 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
581581
title: 'Subject',
582582
type: 'short-input',
583583
placeholder: 'Activity subject/title',
584-
required: true,
584+
required: { field: 'operation', value: 'create_activity' },
585585
condition: { field: 'operation', value: ['create_activity', 'update_activity'] },
586586
},
587587
{
@@ -605,7 +605,7 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
605605
title: 'Due Date',
606606
type: 'short-input',
607607
placeholder: 'YYYY-MM-DD',
608-
required: true,
608+
required: { field: 'operation', value: 'create_activity' },
609609
condition: { field: 'operation', value: ['create_activity', 'update_activity'] },
610610
wandConfig: {
611611
enabled: true,
@@ -667,10 +667,11 @@ Return ONLY the time string in HH:MM format - no explanations, no quotes, no ext
667667
title: 'Mark as Done',
668668
type: 'dropdown',
669669
options: [
670+
{ label: 'No change', id: '' },
670671
{ label: 'Not Done', id: '0' },
671672
{ label: 'Done', id: '1' },
672673
],
673-
value: () => '0',
674+
value: () => '',
674675
condition: { field: 'operation', value: ['update_activity'] },
675676
},
676677
{
@@ -765,10 +766,11 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
765766
title: 'Archive Lead',
766767
type: 'dropdown',
767768
options: [
769+
{ label: 'No change', id: '' },
768770
{ label: 'No', id: 'false' },
769771
{ label: 'Yes', id: 'true' },
770772
],
771-
value: () => 'false',
773+
value: () => '',
772774
condition: { field: 'operation', value: ['update_lead'] },
773775
},
774776
{

‎apps/sim/blocks/blocks/square.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -925,8 +925,8 @@ export const SquareBlock: BlockConfig = {
925925
...(coercedLimit !== undefined && { limit: coercedLimit }),
926926
...(coercedVersion !== undefined && { version: coercedVersion }),
927927
...(coercedOrderVersion !== undefined && { orderVersion: coercedOrderVersion }),
928-
...(autocomplete !== undefined && { autocomplete: coerceBoolean(autocomplete) }),
929-
...(includeRelatedObjects !== undefined && {
928+
...(autocomplete != null && { autocomplete: coerceBoolean(autocomplete) }),
929+
...(includeRelatedObjects != null && {
930930
includeRelatedObjects: coerceBoolean(includeRelatedObjects),
931931
}),
932932
}

‎apps/sim/lib/internal/square/operations.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ describe('executeSquareCreateCatalogImage', () => {
6464
idempotency_key: 'stable-key',
6565
object_id: 'item-1',
6666
})
67+
expect(formData.get('image_file')).toBeInstanceOf(Blob)
6768
expect(vi.mocked(fetch).mock.calls[0][0]).toBe('https://connect.squareup.com/v2/catalog/images')
6869
})
6970

‎apps/sim/lib/internal/square/operations.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export async function executeSquareCreateCatalogImage(
6464
const formData = new FormData()
6565
formData.append('request', JSON.stringify(imageRequest))
6666
formData.append(
67-
'file',
67+
'image_file',
6868
new Blob([new Uint8Array(fileBuffer)], {
6969
type: userFile.type || 'application/octet-stream',
7070
}),

0 commit comments

Comments
 (0)