Update the name, description, or query configuration of a pipe-scoped knowledge base data lookup
Before You Begin
🔗 Use the GraphQL Playground to execute the queries in this guide.
➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.
Prerequisites
- Authentication: Use a Service Account token (Personal Access Tokens are deprecated).
- Permissions: You must be admin of the pipe where the data lookup was created.
- Data Lookup ID: The
idreturned when the data lookup was created. See Create Knowledge Base Data Lookup.
Update a Knowledge Base Data Lookup
Use the updateAiKnowledgeBaseDataLookup mutation to change a data lookup's name, description, source pipe, search query, output fields, or conditions. All fields are optional — only the attributes you provide will be updated; omitted fields remain unchanged.
Inputs
- pipeUuid: UUID of the pipe that owns this data lookup (required).
- dataLookupId: ID of the data lookup to update (required).
- name: New display name of the data lookup (optional).
- description: New description of the data lookup (optional).
- sourceRepoId: ID of the new source pipe to query records from (optional).
- searchQuery: Updated free-text keyword to filter records in the source pipe (optional).
- outputFields: Updated list of field IDs to return from matching records (optional).
- conditions: Updated list of filter conditions (optional). When provided, replaces the existing conditions entirely. Each condition has the same fields as in Create Knowledge Base Data Lookup.
Example: update name and description only
mutation {
updateAiKnowledgeBaseDataLookup(
input: {
pipeUuid: "pipe-uuid-123"
dataLookupId: "data-lookup-uuid-789"
name: "Updated Customer Data Lookup"
description: "Looks up active customer records — revised April 2025"
}
) {
knowledgeBaseDataLookup {
id
name
description
updatedAt
}
}
}
Example: update query configuration
mutation {
updateAiKnowledgeBaseDataLookup(
input: {
pipeUuid: "pipe-uuid-123"
dataLookupId: "data-lookup-uuid-789"
name: "Customer Data Lookup"
description: "Looks up customer records from the sales pipe"
sourceRepoId: "16"
searchQuery: "open records"
outputFields: ["this_is_a_quote"]
conditions: [
{
field: "assignees"
attribute: "ASSIGNEES"
operator: "contains"
value: "10"
usingFillWithAi: false
inputType: "assignee_select"
}
]
}
) {
knowledgeBaseDataLookup {
id
name
description
updatedAt
}
}
}
Response:
{
"data": {
"updateAiKnowledgeBaseDataLookup": {
"knowledgeBaseDataLookup": {
"id": "data-lookup-uuid-789",
"name": "Customer Data Lookup",
"description": "Looks up customer records from the sales pipe",
"updatedAt": "2025-04-14T12:00:00Z"
}
}
}
}
Response explained
- knowledgeBaseDataLookup.id: Unique identifier of the data lookup.
- knowledgeBaseDataLookup.name: Current display name of the data lookup.
- knowledgeBaseDataLookup.description: Current description of the data lookup.
- knowledgeBaseDataLookup.updatedAt: When the data lookup was last updated.
Error handling
If the update fails (e.g., invalid input, permission denied, or pipe not found), you'll receive an error response:
{
"data": {
"updateAiKnowledgeBaseDataLookup": null
},
"errors": [
{
"message": "Permission denied",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": ["updateAiKnowledgeBaseDataLookup"]
}
]
}
Error response explained
- data.updateAiKnowledgeBaseDataLookup: Returns
nullwhen the operation fails. - errors: Array containing error details when the operation fails.
- errors[].message: Human-readable error description. Common messages:
"Permission denied"— the authenticated user is not an admin of the pipe."Pipe not found with id: <uuid>"— thepipeUuiddoes not match an existing pipe."Field 'updateAiKnowledgeBaseDataLookup' doesn't exist on type 'Mutation'"— the feature flag is not enabled for the organization.
Tips
- Partial updates: Only the fields you include in the mutation input will be changed. Omitting a field leaves its current value intact.
- Replacing conditions: When you provide
conditions, the entire conditions list is replaced. To keep existing conditions unchanged, omit theconditionsfield entirely. - Finding your data lookup ID: The
idis returned by thecreateAiKnowledgeBaseDataLookupmutation. See Create Knowledge Base Data Lookup.
