Skip to main content

Document Flags

Tag documents automatically with custom labels based on your business rules

Document Flags let you tag documents with custom labels (called flags) based on business conditions. Flags are applied automatically during document processing: you define the conditions through rules and instructions, and the system applies the right flags to the right documents.

For example, you can set up a rule that flags every invoice over 10,000 USD as HighValue. Each invoice meeting that condition automatically receives the HighValue flag after processing. Flags can then be viewed, filtered, and exported alongside the rest of a document's data. Each flag belongs to one organization, has its own color, and you can arrange flags in order of priority.


How It Works

Flags are created in Main menu → Flagging, the master list of every flag in your tenant. Each flag belongs to exactly one organization: only that organization's rules and instructions can apply it, and only people who work in that organization, along with admins and managers, can change it. Once a flag exists, it can be applied to documents automatically during processing through three sources: Transformations, Rejection Rules, and Instruction Builds. Rule-based sources apply flags deterministically, while instruction builds apply them through AI evaluation. When a document is reprocessed, all previously applied flags are cleared and recalculated, so flags always reflect the current state of your rules and instructions.

Global and country rules and instructions are not for one organization, so they name their flags as text instead. You can add a flag to a global or country rule or instruction without first adding it on the Flagging page. See Flags in Global and Country Rules below.

Creating Flags

Flags are created and managed on the Flagging settings page using + Add New. When you add a flag, you give it a name, a color, and the organization it belongs to, and the new flag is added to the end of the list. If you work in only one organization, the flag belongs to it and you are not asked. If you work in several, you choose one. Each sub-organization has its own flags, so the same flag name can be used in several sub-organizations, but not twice in the same one.

Each flag in the list shows its color next to its name, the organization it belongs to in the Organization column, and three usage counters for the number of Transformations, Rejection Rules, and Instructions that reference it; clicking a counter navigates directly to those items. For the full procedure, including naming rules and how editing or deleting behaves while a flag is in use, see the Creating and Managing Flags guide.

The Flagging page listing flags with their colors, the organization each belongs to, and usage counters in the Transformations, Rejections and Instructions columns, where the same flag name, TRANSLATED, appears once for each of four organizations

Who Can See and Change a Flag

A flag belongs to exactly one organization, and the Organization column on the Flagging page names it. Flags belong to sub-organizations only; a parent organization has no flags of its own.

  • Users who work in one or more organizations see the flags of those organizations. They do not see another organization's flags.

  • Admins and managers can change any flag.

  • Other users can rename, recolor, delete, or reorder a flag only when it belongs to an organization they work in. The Edit and Delete actions and the drag handle of any other flag are grayed out, with a tooltip that explains whose flag it is.

  • Admins, managers, and users with a custom role can move a flag to another organization by editing it and choosing a new Organization. Admins and managers can move any flag; users with a custom role can move only the flags of organizations they work in, only to another organization they work in, and need Update access to Flagging. A move is refused while rules or instructions of the organization the flag would leave still use it. Point those rules and instructions at another flag first. A move is also refused, with an alert, when the sub-organization you choose already has a flag with the same name.

Flag Colors

Each flag has a color, chosen from a set of preset colors when the flag is created or edited. The flag's pill tags appear in this color across the platform:

  • The Flags column on the document list

  • The Flags section on the document detail and review page

  • The Flags card in the console

  • The flags raised by rules and instructions on the console's Enrichment tab

Changing a flag's color updates it on every document that carries the flag, including finalized documents. Flags created before colors were introduced have no color, and appear with black text on a light gray background until a color is selected.

Ordering Flags

The order of flags on the Flagging page sets their priority, with the first flag as the highest. To change the order, drag a flag by its handle to a new position. The new order is saved automatically and applies to all users in the tenant.

A drag only rearranges the flags you move, among the positions they already held. Flags of other organizations that you cannot change keep their places.

Flags appear in this order wherever they are listed:

  • The Flagging page

  • The flag filter on the document list

  • A document's flags on the document list, the document detail and review page, and in the console

  • Flag markers in XML exports

New flags are added to the end of the list. The list cannot be sorted by column. Reordering requires write access to Flagging and is not available while a search is active.

Applying Flags to Documents

Flags reach documents through three sources during processing. A rule or instruction for an organization, or for trading partners that belong to one, can only apply that organization's own flags.

  • Transformations. When you create a transformation for an organization, the AI is given that organization's flags and can generate flag actions (Field = Flag) as part of the rule. If the AI suggests a flag the organization does not have, the system shows a warning directing you to create it first. Multiple flag actions in a single rule are grouped into one row in the rule actions table and displayed as pill tags. At processing time every flag of a matching rule is applied, deterministically and with no AI involved.

  • Rejection Rules. You can manually add flag actions to a rejection rule. Each flag action uses Field = Flag and Action = SET. You enter the value one flag at a time: type a flag name and press Enter, or leave the field, and the flag becomes a pill tag. Pasting several names separated by commas or semicolons adds each one. For an organization's rule the field offers that organization's flags and highlights any other name, because the save would refuse it. The AI can also generate flag actions when you create a rejection rule with AI. Because a rejection rule can both reject and flag, a document can be rejected and flagged at the same time. Like transformation flags, they are applied deterministically at processing time.

  • Instruction Builds. Instruction builds have no separate flags UI; flag conditions are written inline in the instruction text (for example, "If the document source is a specific trading partner, add the PartnerReview flag"). When the instruction is saved, the system reads each instruction on its own with the AI, extracts the flags it names, and checks each against the flags of the organization the instruction is for. An organization's instruction placed in several organizations must name flags that every one of them has. A trading partner's instruction is checked against the organization its partners belong to. If a new or changed instruction names a flag that is missing, the save is blocked with an error that names the missing flags and asks you to create them or remove them. An instruction that was already saved and is unchanged never blocks the save, even if a flag it names has since been renamed or removed. Instruction builds are the only source where flag application involves AI at processing time: the AI evaluates each instruction against the document and decides which flags apply, drawing on both the document's structured data and its raw OCR text.

Flags in Global and Country Rules

Global and country rules and instructions do not belong to one organization, so they name their flags as text. The same applies to rules and instructions for trading partners that belong to no organization.

  • You do not need to add the flag on the Flagging page first. Type the flag name directly in the global or country rule or instruction.

  • The name must still be a single word of at most 24 characters. Separate several flags with commas.

  • When the document's organization has a flag with the same name, ignoring capitals, the document shows that flag, with its color, position, and spelling.

  • Otherwise the flag appears on the document by its name, with no color, after the document's other flags.

Applying Flags with CSV Keyword Matching

Transformations and Rejection Rules can also apply flags in bulk by linking a CSV supporting file that holds value-to-flag mappings. Instead of writing one rule per value, you link a CSV whose columns pair the values to match with the flag values to apply, and the system flags documents deterministically at processing time for every row that matches. Flag values taken from the CSV do not need to be pre-created in Main menu → Flagging. A value that matches a flag of the document's organization takes that flag's color and position; any other value has no color and appears after the document's other flags. For the full procedure, see the Applying Flags with CSV Keyword Matching guide.

Viewing and Filtering Flags

Applied flags appear in a Flags column on the document list. The first two flags are shown as pill tags in their colors, followed by a +N badge when there are more; hovering over the badge shows the remaining flags. Documents in PROCESSING, RETRYING, FAILED, or SPLITTING status, and documents without flags, show N/A in this column. On the document detail and review page, applied flags appear as pill tags in a bordered container, and in the console they appear on a Flags card. A flag filter in the document list lets you narrow documents to one or more flags. For the filtering procedure, see the Filtering Documents by Flags guide.


Supported Configurations and Options

Flag Naming Rules

Rule

Detail

No spaces

"HighValue" is valid; "High Value" is not

No commas or semicolons

Commas and semicolons separate flags, so a flag name cannot contain them

Maximum length

24 characters

Not case-sensitive

"HighValue" and "highvalue" are the same name. An organization cannot have both

Unique within a sub-organization

Several sub-organizations can each have a flag with the same name; one sub-organization cannot have two

Editable and deletable

Flags can be recolored at any time, and renamed or deleted while they are not in use

Flag Colors

Option

What it does

Values

Flag color

Sets the color of the flag's pill tags across the platform

Any of the preset colors in the color picker

Flag Organization

Option

What it does

Values

Organization

Sets the one organization the flag belongs to. A flag cannot belong to more than one organization. Shown when you add a flag and work in several organizations, and when you edit a flag you are allowed to move

One of the sub-organizations offered to you. Parent organizations cannot have flags

Permissions

Role

Flagging access

Admin

Read, Create, Update and Delete, on every flag. Can move any flag to another organization

Manager

Read, Create, Update and Delete, on every flag. Can move any flag to another organization

Reviewer

No access

Validator

No access

Reviewer and Validator

No access

Custom role

Read, Create, Update and Delete, each as granted, on the flags of the organizations the user works in. With Update, can move those flags to another organization the user works in

Flagging is its own module in the role builder. It is not bundled with Transformations, Rejections or Instruction Builds, so a custom role must be granted it separately. The Reviewer, Validator and Reviewer and Validator roles include no settings module, so the Flagging settings page does not appear for them. A role with read access only sees the flag list with the add, edit and delete controls grayed out, not hidden. Because each level is granted separately, a role can, for example, rename flags without being able to delete them.

Organization Scoping

  • Every flag belongs to exactly one sub-organization. There are no flags shared with several organizations or with every organization, and a parent organization has no flags of its own.

  • Users who work in one or more organizations, with or without Self-Service Access, see the flags of the organizations assigned to them.

  • A custom role with access to every organization sees every flag except the flags of organizations with Self-Service Access enabled.

  • Users who work in no organization see every flag except the flags of organizations with Self-Service Access enabled.

  • Admins and managers see every flag across all organizations.

  • All users see flags in the order set on the Flagging page.

Data Export Flag Markers

  • Destination format XML templates can include flag markers: <!--FLAG START--><Flag>{flag_name}</Flag><!--FLAG END-->.

  • During export, the {flag_name} placeholder is replaced with the actual flag names applied to the document, in the order set on the Flagging page.

  • If a document has no flags, or the feature is disabled, the entire flag marker block is stripped from the output so no raw artifacts remain.


Other Technical Specifications

Feature Toggle

  • The entire feature is controlled by the Flagging feature toggle.

  • When disabled: the Flagging settings page is hidden, flag columns and filters are hidden, and flag processing is skipped.

Processing Model

  • Transformation and Rejection Rule flags fire deterministically at processing time, with no AI involved. Every flag action of a matching rule is applied.

  • Instruction Build flags are evaluated by AI at processing time; this is the only source where AI is involved in applying flags. The AI uses both the document's structured data and its raw OCR text.

  • A flag raised by name is matched among the flags of the document's organization. Another organization's flag of the same name is never used.

  • On reprocessing, all previously applied flags are deleted before flag application runs again, so results never carry stale data from earlier runs.

Organization Deletion

  • Deleting an organization also deletes its flags.

  • Documents keep the flags they already carry.

Activity Log

  • Flag create, rename, color change, reorder, move, and delete operations are recorded in the Settings activity log alongside other auditable operations.

  • Example entries: "User created flag 'Fraud'", "User renamed flag 'Tax' to 'TaxReview'", "User moved flag 'Finance' from position 3 to 4", and "User changed which organization flag 'Urgent' belongs to".


Notes

  • Flag names are not case-sensitive: "HighValue" and "highvalue" are the same name, and one sub-organization cannot have both. Several sub-organizations can each have their own "HighValue".

  • A flag that is in use by any rule or instruction cannot be renamed or deleted. Its Delete action is grayed out, and when you edit it, the name is grayed out and only the color and the organization can be changed. To rename or delete it, remove the references first; clicking a usage counter takes you to them.

  • Deleting a flag does not remove it from the documents that already carry it. A document keeps the flags it was processed with, shown without color after its other flags, until it is reprocessed.

  • If you add a flag with the same name as a deleted flag of the same organization, the deleted flag is restored with the name and color you entered, at the end of the list.

  • A rule or instruction for an organization can only use that organization's flags. Saving one that names another organization's flag, or a flag that does not exist, is blocked with an error naming the flags. If you cannot create flags, the error asks you to contact an administrator.

  • If the flags of a new or changed instruction cannot be checked in time, nothing is saved and you are asked to try again in a moment. Instructions that were already saved and are unchanged do not hold up the save.

  • A comma between two digits is part of a value (for example, "Over 5,000" stays one flag). Other commas, and semicolons, separate flags.

  • The Flags column, the flag filter, and the console's Flags card are only visible to users with Flagging read permission.

  • Disabling the Flagging feature hides flags everywhere and skips flag processing; flag markers are also stripped from exported output.


Did this answer your question?