Skip to content

Commit fd35186

Browse files
committed
fix(integrations): accept the No change dropdown value without block context, document the legacy Mailchimp landing page type, and type the ServiceNow path tests
1 parent e5cb641 commit fd35186

6 files changed

Lines changed: 32 additions & 6 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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" or "product" |
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/sim/blocks/blocks/intercom.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,16 @@ export const IntercomBlock: BlockConfig = {
188188
id: 'role',
189189
title: 'Role',
190190
type: 'dropdown',
191+
/**
192+
* Update Contact leads with "No change" so a new block does not resend a role. Without block
193+
* values (Copilot validation, catalogs) every option is listed, with "No change" last so
194+
* the default stays Lead.
195+
*/
191196
options: (params) => [
192197
...(params?.values.operation === 'update_contact' ? [{ label: 'No change', id: '' }] : []),
193198
{ label: 'Lead', id: 'lead' },
194199
{ label: 'User', id: 'user' },
200+
...(params ? [] : [{ label: 'No change', id: '' }]),
195201
],
196202
condition: {
197203
field: 'operation',

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,17 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
282282
id: 'status',
283283
title: 'Status',
284284
type: 'dropdown',
285+
/**
286+
* Update Deal leads with "No change" so a new block does not reopen deals. Without block
287+
* values (Copilot validation, catalogs) every option is listed, with "No change" last so
288+
* the default stays Open.
289+
*/
285290
options: (params) => [
286291
...(params?.values.operation === 'update_deal' ? [{ label: 'No change', id: '' }] : []),
287292
{ label: 'Open', id: 'open' },
288293
{ label: 'Won', id: 'won' },
289294
{ label: 'Lost', id: 'lost' },
295+
...(params ? [] : [{ label: 'No change', id: '' }]),
290296
],
291297
condition: { field: 'operation', value: ['create_deal', 'update_deal'] },
292298
},

‎apps/sim/tools/generated/tool-metadata.ts‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎apps/sim/tools/mailchimp/create_landing_page.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ export const mailchimpCreateLandingPageTool: ToolConfig<
3939
type: 'string',
4040
required: true,
4141
visibility: 'user-or-llm',
42-
description: 'The type of landing page: "signup" or "product"',
42+
description:
43+
'The type of landing page: "signup" or "product" ("click-through" is kept for saved workflows but is not in the current API)',
4344
},
4445
landingPageTitle: {
4546
type: 'string',

‎apps/sim/tools/servicenow/servicenow.test.ts‎

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { getIncidentTool } from '@/tools/servicenow/get_incident'
1717
import { listIncidentsTool } from '@/tools/servicenow/list_incidents'
1818
import { readRecordTool } from '@/tools/servicenow/read_record'
1919
import { searchKnowledgeTool } from '@/tools/servicenow/search_knowledge'
20+
import type { ServiceNowDeleteParams, ServiceNowReadParams } from '@/tools/servicenow/types'
2021
import { updateChangeStateTool } from '@/tools/servicenow/update_change_state'
2122
import { updateRecordTool } from '@/tools/servicenow/update_record'
2223

@@ -859,8 +860,20 @@ describe('the limit guidance matches what the block actually sends', () => {
859860
})
860861

861862
describe('ServiceNow URL path segments', () => {
863+
function deleteUrl(params: ServiceNowDeleteParams): URL {
864+
const { url } = deleteRecordTool.request
865+
if (typeof url !== 'function') throw new Error('delete record url must be a builder')
866+
return new URL(url(params))
867+
}
868+
869+
function readUrl(params: ServiceNowReadParams): URL {
870+
const { url } = readRecordTool.request
871+
if (typeof url !== 'function') throw new Error('read record url must be a builder')
872+
return new URL(url(params))
873+
}
874+
862875
it('keeps valid table names and sys_ids byte-identical', () => {
863-
const url = urlOf(deleteRecordTool, {
876+
const url = deleteUrl({
864877
...auth,
865878
tableName: 'u_custom_table',
866879
sysId: '46d44a5dc0a8010e0115a9c2b1a3a8e5',
@@ -870,8 +883,8 @@ describe('ServiceNow URL path segments', () => {
870883

871884
it('rejects a sys_id that would walk to another endpoint', () => {
872885
expect(() =>
873-
urlOf(deleteRecordTool, { ...auth, tableName: 'incident', sysId: '../../sys_user/abc' })
886+
deleteUrl({ ...auth, tableName: 'incident', sysId: '../../sys_user/abc' })
874887
).toThrow()
875-
expect(() => urlOf(readRecordTool, { ...auth, tableName: '..', sysId: 'abc' })).toThrow()
888+
expect(() => readUrl({ ...auth, tableName: '..', sysId: 'abc' })).toThrow()
876889
})
877890
})

0 commit comments

Comments
 (0)