Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(agentphone): drop empty-string updates in update_contact
  • Loading branch information
waleedlatif1 committed Apr 23, 2026
commit e1f6c5fa4279bdae7a2dcca91f9a65c06407c590
8 changes: 4 additions & 4 deletions apps/sim/blocks/blocks/agentphone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,10 @@ export const AgentPhoneBlock: BlockConfig = {
}

if (['create_contact', 'update_contact'].includes(operation as string)) {
if (contactPhoneNumber !== undefined) rest.phoneNumber = contactPhoneNumber
if (contactName !== undefined) rest.name = contactName
if (contactEmail !== undefined) rest.email = contactEmail
if (contactNotes !== undefined) rest.notes = contactNotes
if (contactPhoneNumber) rest.phoneNumber = contactPhoneNumber
if (contactName) rest.name = contactName
if (contactEmail) rest.email = contactEmail
if (contactNotes) rest.notes = contactNotes
}
Comment thread
waleedlatif1 marked this conversation as resolved.

if (operation === 'list_contacts' && contactsSearch !== undefined) {
Expand Down
8 changes: 4 additions & 4 deletions apps/sim/tools/agentphone/update_contact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ export const agentphoneUpdateContactTool: ToolConfig<
}),
body: (params) => {
const body: Record<string, unknown> = {}
if (params.phoneNumber !== undefined) body.phoneNumber = params.phoneNumber
if (params.name !== undefined) body.name = params.name
if (params.email !== undefined) body.email = params.email
if (params.notes !== undefined) body.notes = params.notes
if (params.phoneNumber) body.phoneNumber = params.phoneNumber
if (params.name) body.name = params.name
if (params.email) body.email = params.email
if (params.notes) body.notes = params.notes
return body
},
},
Expand Down
Loading