---
sourceDocument: Australia Platform Analytics
sourceDocumentLink: https://www.servicenow.com/docs/r/australia/now-intelligence

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Platform Analytics

ft:clusterId :

    - par

bundleId :

    - par

workflow :

    - Platform


---

# Manual segment data model and sync behavior

# Manual segment data model and sync behavior {#ariaid-title1}

Release version: Australia  
Updated April 16, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Manual segment data model and sync behavior

Manual segments in ServiceNow use a two-table data model separating configuration and runtime data to optimize search performance while maintaining a single source of truth.
Administrators define manual segments in thesnquerygensegmenttableconfigconfiguration table.
These configurations are automatically synced to thesnquerygensegmentruntime table, which is used during search operations.
Show full answer Show less  

## Configuration and Runtime Tables

* **Configuration table (`snquerygensegmenttableconfig`)**: Stores manual segment definitions including a user-friendly name, filter conditions, description, domain (for domain-separated instances), and the target entity table. This table is the authoritative source for segment data.
* **Runtime table (`snquerygensegment`)**: Populated automatically via business rules syncing from the configuration table. This table supports efficient search queries and must not be edited directly.

## Key Fields in Configuration Table

* **Name:** Required, used by the LLM during semantic search.
* **Filter:** Required, encoded query defining segment conditions (using Condition Builder v2).
* **Active:** Defaults to true; deactivating excludes the segment from search results.
* **Description:** Optional, helps clarify segment purpose for LLM understanding.
* **Domain:** Used in domain-separated instances to limit segment scope by domain.
* **Entity:** Specifies the target table and must have semantic generation enabled.

## Synchronization Behavior

* Segments automatically sync from configuration to runtime table on insertion or update.
* Entity creation or updates also trigger full resyncs for related segments.
* A weekly scheduled job performs full synchronization and cleans orphaned records.
* Segments are only active and included in searches if both the segment and its entity are active.
* Deactivation or deletion of segments or entities appropriately updates or removes runtime records.

## Activation and Deactivation

* Changing a manual segment's active status affects its availability in searches.
* Deactivated segments are excluded from search results but not deleted unless the config record is removed.
* Entity status changes also impact all associated segments.

## Security and Management

* Strict Access Control Lists (ACLs) protect the runtime table to ensure it reflects the configuration table without direct edits.
* Segments must be created or modified only in the configuration table.

## Filter Length and Best Practices

* Although the filter field supports up to 4,000 characters, a system property limits filters to 2,000 characters for LLM prompting.
* Truncation occurs if filters exceed this limit; therefore, concise filters are recommended.
* Complex segments should be split into multiple focused segments to maintain clarity and performance.

## Domain Separation Support

Manual segments support domain separation by associating segments with domains. At search time, segment visibility respects the user's domain context. This is relevant only if domain separation is enabled on the instance.

## Practical Implications for ServiceNow Customers

* Use the configuration table to define and maintain manual segments, ensuring semantic search accuracy and performance.
* Rely on the automated sync mechanism to keep runtime search data up-to-date without manual intervention.
* Manage segment activation carefully to control their inclusion in search results.
* Follow best practices for filter length and complexity to optimize LLM prompt effectiveness.
* Leverage domain separation if applicable to enforce data visibility boundaries in multi-domain environments.  
Manual segments use a two-table data model with automatic synchronization between the configuration table and the runtime table used for search operations.

## Data model overview {#manual-segment-data-model-sync__data-model-overview}

Manual segments use a two-table architecture that separates configuration from runtime data. This design ensures that the configuration table remains the single source of truth while the runtime table is optimized for search performance.{#manual-segment-data-model-sync__data-model-intro}

configuration table: sn_query_gen_segment_table_config
:   This is where you define manual segments. Each record represents one segment configuration that administrators create and maintain.

Synced table: sn_query_gen_segment
:   You do not write to this table directly. When a manual segment config is created or updated, a business rule automatically syncs it into this table, which is queried at search time.
{#manual-segment-data-model-sync__table-descriptions}

## Configuration table fields {#manual-segment-data-model-sync__config-table-fields}

The sn_query_gen_segment_table_config table contains the following fields for defining manual segments:{#manual-segment-data-model-sync__config-table-intro}
{#manual-segment-data-model-sync__config-table-structure__entry__5}

| Field | Column Name | Max Length | Required | Purpose |
|-|-|-|-|-|
| Name | name | 255 chars | Yes | User-friendly name that the LLM matches against during semantic search. |
| Active | active | --- | No | Defaults to true. When false, the segment is deactivated and excluded from search. |
| Description | description | 4,000 chars | No | Optional clarification using commonly-used terms. Helps the LLM understand when to apply the segment. |
| Filter | filter | 4,000 chars | Yes | Encoded query defining the segment's filter conditions. Uses the condition builder (v2). |
| Domain | sys_domain | --- | No | On domain-separated instances, specify here the domain to which the segment applies. At search time, segments are filtered by the user's domain context. |
| Entity | table_name | --- | Yes | The table (entity) that the segment applies to. The table must have a record in the Semantic Table Configurations \[sn_query_gen_table_config\] table. The value of Enable Semantic Generation on that record must be <kbd class="ph userinput">true</kbd>. |
[Table 1. Manual segment configuration table fields]

{#manual-segment-data-model-sync__config-table-structure}

## Synced table fields {#manual-segment-data-model-sync__synced-table-fields}

The sn_query_gen_segment table contains the runtime data used for search operations:{#manual-segment-data-model-sync__synced-table-intro}
{#manual-segment-data-model-sync__synced-table-structure__entry__2}

| Field | Source |
|-|-|
| name | Copied from manual segment config |
| description | Copied from manual segment config |
| filter | Copied from manual segment config |
| table | From table_name |
| entity | Resolved reference to sn_query_gen_entity |
| source_table | Always sn_query_gen_segment_table_config |
| source_id | Sys_id of the manual segment config record |
| active | `manual_segment.active AND entity.active` |
[Table 2. Synced segment table fields]

{#manual-segment-data-model-sync__synced-table-structure}

## Sync behavior {#manual-segment-data-model-sync__sync-behavior}

Manual segments are synced automatically between the configuration and runtime tables. You do not need to trigger synchronization manually.{#manual-segment-data-model-sync__sync-intro}
{#manual-segment-data-model-sync__sync-triggers__entry__3}

| Trigger | When | What Happens |
|-|-|-|
| Business rule on config | Insert or update on sn_query_gen_segment_table_config | Syncs the individual record into sn_query_gen_segment (async) |
| Entity insert/update | When an entity is created or updated with active=true | Re-syncs all segments (including manual) for that entity |
| Weekly scheduled job | Saturdays at midnight | Full sync of all 6 segment sources; cleanup of orphaned records |
[Table 3. Sync triggers]

{#manual-segment-data-model-sync__sync-triggers}

During sync, a manual segment is eligible if:{#manual-segment-data-model-sync__eligibility-check}

1. active = true on the config record
2. The referenced table has an active entity in sn_query_gen_entity

{#manual-segment-data-model-sync__eligibility-criteria}

If either condition is not met, the synced segment is deactivated (not deleted).{#manual-segment-data-model-sync__eligibility-result}

## Activation and deactivation {#manual-segment-data-model-sync__activation-deactivation}

A synced segment's active status is: `manual_segment.active AND entity.active`.{#manual-segment-data-model-sync__activation-formula}
{#manual-segment-data-model-sync__activation-events__entry__2}

| Event | Result |
|-|-|
| Manual segment config active → false | Synced segment deactivated |
| Manual segment config active → true | Synced segment reactivated (if entity is also active) |
| Entity active → false | All segments for that entity deactivated |
| Manual segment config deleted | Synced segment deleted |
| Entity deleted | Orphaned segments cleaned up by scheduled job |
[Table 4. Activation and deactivation events]

{#manual-segment-data-model-sync__activation-events}

Deactivated segments are excluded from search results.{#manual-segment-data-model-sync__deactivation-note}

## ACL protections {#manual-segment-data-model-sync__acl-protections}

The synced segment table has strict ACLs so that the configuration table remains the single source of truth:{#manual-segment-data-model-sync__acl-intro}

* **Create:** Blocked (admin_overrides = false) --- segments can only be created via sync
* **Write to name:** Blocked --- must be changed on the config record
* **Write to description:** Blocked --- must be changed on the config record
{#manual-segment-data-model-sync__acl-restrictions}

## Filter length considerations {#manual-segment-data-model-sync__filter-length-considerations}

While the filter field supports up to 4,000 characters, the system property sn_query_gen.segments.max_filter_length defaults to 2,000. Filters longer than this threshold are truncated when included in the LLM prompt.{#manual-segment-data-model-sync__filter-length-intro}  
Tip:  
Keep filters concise for best results. Consider splitting complex segments into multiple focused segments instead of creating one segment with many conditions.

## Domain separation {#manual-segment-data-model-sync__domain-separation}

Manual segments support domain separation. When creating a segment config record with a specific sys_domain, the synced segment inherits that domain. At search time, segments are filtered by the user's domain context.{#manual-segment-data-model-sync__domain-separation-intro}

If domain separation is not enabled on your instance, this field is inactive and can be ignored.{#manual-segment-data-model-sync__domain-separation-note}
**Related concepts**   

* [Guidelines for segments](https://www.servicenow.com/docs/DW44GxCqzayzCfuz4rPtCA "Follow these suggestions to help you use segments in the semantic layer effectively.")  
**Related tasks**   

* [Create a manual segment](https://www.servicenow.com/docs/aPVzsc7wyGsf2jz7ThwDlA "Manual segments are admin-created saved searches with friendly names that bridge natural language questions and database filters for the Query Generation semantic layer.")  
**Related reference**   

* [Query Generation properties](https://www.servicenow.com/docs/zkRx3uAT0Sa4Zf7lTp4Gww "The properties included with Query Generation apply to segments. They define whether the record or indicator that is the basis for a segment has been recently used or changed.")

