Temporal custom search attributes

Custom search attributes let operators find Temporal workflows by customer, order or status through list filters. This page covers the design, registration and data-handling decisions to make before the first workflow starts.

On this page

Finding Temporal workflows by customer, order or status with custom search attributes

A support or operations team often needs to find a running or closed Temporal workflow by a business key such as a customer ID, order number or fulfillment status, without opening each execution one by one. Custom search attributes answer that need. A Search Attribute is an indexed key-value field in a Workflow Execution's visibility information, and it is what List Filters query. The design choices made here decide which lookups are possible later, because a field that was never registered and populated cannot be filtered on after the fact. Before building anything, list the three or four questions operators ask most often, then define one attribute for each field those questions depend on. Keep the set small so that the visibility store and the team's filters stay manageable.

Search attributes are not always the right answer. If the operator already knows the workflow ID, which is often derived from the business key, a direct describe call is simpler and needs no visibility setup. If the question is about the internal state of one running workflow, a Query usually reads that state more directly than a list filter does. If the team needs reporting, joins across customers, or long-term history that the visibility store does not hold, the application's own database is the better source of truth, and the workflow should write the business record there instead of relying on visibility. Treat search attributes as an index for finding executions, not as the system of record.

Before a team commits to a design, it should confirm with its own environment which attribute types its Temporal version and visibility backend support, how and where attributes are registered for each namespace, and what the list filter syntax accepts. Those details differ across releases and backends, so the Temporal Search Attributes documentation is the authoritative next read. Do not place sensitive data, secrets or personal information in search attributes. Use stable identifiers that are meaningless outside the system, and keep names and contact details in the application database where access controls apply.

How a custom search attribute moves from workflow code to a list filter

The path starts in workflow code, where a value is set on the execution as an indexed key-value field. The namespace must have that attribute registered before it can be used in list filters, and the value is then written to the visibility store. Operators query that store through the Web UI or CLI, so the trust boundary sits around the store and the access point. Keep customer identifiers and order references as opaque IDs, and keep personal data, secrets and payloads out of the path entirely.

Search attribute values flow from workflow code through registration into the visibility store.

Which attribute type fits customer, order and status fields

This table compares the candidate Search Attribute types for each kind of business key an operator is likely to filter on, from customer identifiers to amounts and timestamps. Read each row as a question: what the operator will filter by, and whether the chosen type supports that comparison. The main takeaway is that the type decides which filters work, so confirm the supported types and their filter behavior for your server version before registering anything.

Business keyLikely type choiceWhen it fits a filterWhat to confirm
Customer identifierKeyword, if supported for exact matchExact lookup of all workflows for one customer IDWhether your version offers a keyword type and its exact-match behavior
Order numberKeyword, if supported for exact matchExact lookup of one order and its related workflowsThat order numbers are stable and carry no personal information
Status valueKeyword with a fixed set of valuesListing workflows in a given state such as pending or failedWhich values your workflow code writes and that they stay consistent across versions
Timestamp (for example, submitted at)Datetime, if supportedRange queries over a time window for reporting or triageHow your version stores time zones and how filters compare datetimes
Numeric amountInt or double, if supportedRange filters such as amounts above a thresholdNumeric precision and whether amounts should be stored at all
Boolean flagBool, if supportedFiltering on a yes or no state such as on holdWhether your version supports the bool type in List Filters
Free-form text or notesNot recommended as a Search AttributeGenerally not suited to filteringKeep such content in the workflow payload instead

Registering custom search attributes per namespace

This sequence takes a set of business fields from a naming decision to a verified list filter in each namespace, so operators can find workflows by customer, order or status in every environment that runs them.

  1. Decide attribute names and types

    The workflow owners and the operators who will search the workflows agree on a short list of search attributes, each with a name, a type and the question it answers, such as which order or which status. Record the list in the design document with a note on who owns each attribute. The step is done when every attribute has a name and type that the team has reviewed, and no field on the list holds personal data, secrets or other sensitive values. Temporal states that search attributes should not carry sensitive data, so the review rejects those fields before anything is registered.

  2. Confirm the visibility store is in place

    The platform team confirms that the cluster's advanced visibility store is configured and reachable, because custom search attributes are indexed there and cannot be listed without it. Check the visibility store against the version of Temporal Server you run, using the current visibility documentation, and confirm the store type your environment uses is supported for advanced visibility. Ask the operator who owns the store to confirm its health and capacity for the expected number of workflow executions. The step is done when the team can name the visibility store, its version and the owner who signed off.

  3. Register each attribute in the target namespace

    An operator with the right administrative access registers each approved attribute in the namespace where its workflows run, using the registration method documented for your Temporal version (confirm the exact command or API call in the docs before you run it). Registration applies to one namespace only, so the operator records the namespace, attribute name and type for each entry. The step is done when the namespace's list of search attributes shows every approved name with the agreed type, and no attribute has a conflicting type from an earlier registration.

  4. Repeat registration for every namespace and environment

    The same attributes must be registered separately in each namespace and in each environment, including development, test, staging and production, because registration does not carry over automatically. The team keeps a single register-and-check record per namespace so a missing attribute in one environment is visible before a release. The step is done when each namespace's attribute list matches the approved list, and a diff between environments shows no unexplained differences.

  5. Set workflow code to write the values

    Developers update workflow code so the workflow sets each registered attribute at the point the value becomes known, such as when an order ID is received or a status changes. They use the SDK method for upserting search attributes in the language they use (confirm the method name in the SDK documentation for the SDK version in use). Values must match the registered type, and the code should avoid writing sensitive data. The step is done when a code review confirms each attribute has a single owner in the code, the types match the registration, and the change passes the team's replay tests.

  6. Verify with a test workflow

    The team starts a test workflow in a non-production namespace that sets every attribute, then opens its execution details in the Web UI or reads its description through the API to confirm each value appears. They then run a list filter that matches one attribute value and check that the test execution is returned, and a second filter that should return no results. The step is done when the attribute values are visible on the execution, the positive filter returns the test execution, and the negative filter returns nothing. Record the filter queries so they can be rerun after each change.

  7. Repeat verification in each target namespace

    After the test passes in one namespace, the same verification runs in every other namespace that will use the attributes, including production after its change window. Operators record the query results per namespace and keep them with the registration record. Any mismatch, such as an attribute missing from one namespace or a filter that returns unexpected results, blocks the release until it is corrected. The step is done when each namespace has a recorded test execution and matching filter results.

Why the visibility store decides how far list filters scale

List filters on custom search attributes run against the advanced visibility store, not the workflow history database, so the store you choose decides how far your operators can query. Before you register a single search attribute, confirm which advanced visibility store your self-hosted Temporal Server version supports. The researched facts list Elasticsearch 7 and 8, and OpenSearch 2 or later from Temporal Server 1.30.1, as the search-capable stores, while MySQL 8.0.17 or later, PostgreSQL 12 or later and SQLite are supported from 1.20. Cassandra visibility was removed in 1.24, so any older design that assumed it must be replanned. SQLite is suited to development and testing only. Check the version matrix in the Temporal visibility docs against the exact server line you plan to run, because a store that works on one minor version may not be supported on the one you upgrade to.

The documentation recommends Elasticsearch or OpenSearch for anything beyond a few workflow executions. In practice, this means that if your order or customer lookups must work across a growing volume of executions, the relational visibility options are the riskier choice, and you should size the search cluster as a first-class component rather than an afterthought. Plan its storage capacity for indexed visibility records, its backup and retention, and its access controls. Limit who can reach the search endpoint directly, since visibility records carry workflow metadata that operators and support staff can read. Keep the store on private networks, as the deployment guidance asks for Temporal services generally, and agree who owns its patching and upgrades alongside the Temporal Server upgrade plan.

Treat the visibility store as part of the search design, not an infrastructure detail. Ask your team or partner to confirm three things in writing: the store and version pairing for your target Temporal Server release, the expected execution volume and query patterns, and the storage and access controls that will protect the store. Test list filters against realistic data volumes before production launch, using an illustrative set of customer and order attributes, so you learn early which filters are slow or unavailable. If the store changes later, the existing attribute design should still hold, so record the registered attribute names, types and intended filters as part of the design document.

Designing keys for customer, order and status queries

Customer lookups are the most tempting place to put personal data into search attributes, because support staff often start from a name or email address. The safer design is to store a stable, non-personal internal identifier, such as an account or tenant reference that your systems already use and that can be resolved to a person inside an authorized application. That identifier usually stays fixed for the life of a workflow, so it rarely needs updating, and it is specific enough to find all workflows for one customer without spreading identity data across the visibility store.

  • Use an opaque account reference: Store an internal ID rather than a name, email or phone number, and keep the mapping in a system with its own access control.
  • Expect one value per customer, not per workflow: A single customer may have many workflows, so confirm that the query volume per identifier is acceptable for your visibility backend.
  • Check for cardinality growth: Ask how many distinct customers exist and whether the identifier format can grow to match that count without degrading list filters.
  • Decide who can resolve the identifier: Operators who see the ID should not automatically see the customer record, so confirm the lookup path and its audit trail.
  • Avoid customer names in workflow IDs or payloads that are copied into visibility: Confirm which fields your SDK code writes to search attributes so that personal values do not leak in through a side route.

Before you commit to a customer attribute, check with your privacy and security teams which identifiers they classify as personal data and whether your visibility store is in their retention scope.

Keeping sensitive data and secrets out of search attributes

Temporal documents search attributes as indexed fields used in List Filters, and it says not to put sensitive data, secrets or personal information in them. The cards below cover what that rule means for real fields, the replacement patterns teams use, and the places where exposure happens outside the workflow code.

What the rule covers

Search attributes are indexed key-value fields in a Workflow Execution's visibility information, so they are copied out of workflow payloads into a store that operators query. The documented rule excludes sensitive data, secrets and personal information. In practice, customer names, email addresses, account numbers, national identifiers and access tokens all fall outside. Review every proposed attribute with your privacy and security teams before registration, since a field that looks harmless, such as a free-text order note, can carry personal data.

Search attributes docs

Opaque internal identifiers

Use an internal, non-guessable ID generated by your system, such as a surrogate customer or order key, as the searchable value. Operators can then filter by that ID and open the record in your system of record, where access controls already apply. The ID should have no meaning derived from the customer, such as a sequence that reveals volume or an encoded email. Confirm that your support staff can translate the ID to a person through an authorized lookup, not through the visibility store.

Hashed or tokenized references

When operators need to match a value they already hold, such as an email address from a support ticket, store a keyed hash or a token instead of the raw value. A keyed hash supports exact-match filters without storing the plain value, but anyone holding the key can test guesses, so keep the key in a secrets manager and rotate it under a documented process. Tokens from a vault give stronger separation but add a lookup dependency. Decide which pattern fits each field and record the decision.

Lookups in the system of record

Keep the sensitive detail in the system that already owns it, and let the workflow carry only the identifier needed to fetch it. An activity or an authorized internal tool reads the customer record when a person needs the details. This keeps the access model, retention rules and deletion requests in one place. Check that the lookup path is authorized per user and logged, because a workflow that copies the record into its history has moved the data into another store.

Operator access to the Web UI

Exposure is not limited to the query API. Anyone who can open the Temporal Web UI or query the visibility store can read every search attribute value they can see, along with the workflow list. Self-hosted Temporal uses the default noopAuthorizer when no Authorizer is configured, which allows every API request without authentication or access control. Restrict who can reach the UI and the visibility database, and confirm that operator roles match the sensitivity of the values stored.

Self-hosted security docs

Payload encryption is not a substitute

Payload codecs and encryption protect workflow inputs, results and history payloads. Search attributes are indexed for querying, so a codec on payloads does not by itself keep the values out of the visibility store unless your configuration and the Temporal documentation confirm that for your version. Treat the rule as applying regardless of encryption, and ask your Temporal engineers to confirm how search attribute values are stored and displayed in your deployment before you rely on encryption as a control.

Questions buyers ask about Temporal custom search attributes

How much design and build effort does a custom search attribute project take?

The effort depends mostly on how many attributes you need, which visibility store backs them, how many namespaces must share them, and how many existing workflows must be made searchable. A short list of well-chosen attributes for one namespace is a small design task. Many attributes across several namespaces, plus a backfill decision for workflows already running, adds design review, registration steps and testing in each environment. No duration figure is supplied for this work, so ask any partner to break the effort into design, registration, workflow code changes, filter testing and rollout, and to state the assumptions behind each line.

Can our team set up custom search attributes without outside help?

Often yes, if you already run self-hosted Temporal and have engineers who write the workflow code. The work involves choosing names and types, registering attributes per namespace, setting them from workflow code, and writing list filters that operators will use. The harder parts are keeping sensitive data out of attributes, deciding how existing workflows are handled, and confirming that the visibility store you chose handles the filters you need. A useful first step is an internal review of your workflow inventory and the questions operators ask during incidents. Bring in a partner when that review shows a large number of attributes or several namespaces.

What do we need to provide for a custom search attribute engagement?

Plan for three inputs. First, workflow owners who can explain which fields operators search by and which workflow types carry them. Second, access to the visibility store and the Temporal namespaces where attributes will be registered, including the rights to create attributes and to read the results. Third, a test namespace that mirrors production naming and retention, so filters can be verified before they reach production. You should also name a reviewer for data classification, because someone must confirm that every proposed attribute holds identifiers such as order or customer references and not personal information or secrets.

How long does it take to add custom search attributes?

The timeline follows the same drivers as effort: the number of attributes, the number of namespaces, the state of your workflow code and the visibility store's readiness. A small change in one namespace can move quickly once the attribute list is agreed. Changes that touch many workflow types, or that require coordinated deployments of workers, take longer because every workflow version that sets an attribute must ship safely. No duration is supplied for this topic, so request a schedule with milestones from any partner and ask which dependencies, such as store capacity or review cycles, could move it.

Should we keep personal data out of search attributes?

Yes. Temporal states that search attributes must not contain sensitive data, secrets or personal information, because they are indexed for filtering and are visible to anyone with access to list and search workflows. Use stable business identifiers, such as an opaque order reference or an internal customer key, and keep names, contact details, account numbers and free text in the workflow payload, where your payload encryption and access controls apply. Ask your privacy and security reviewers to approve the attribute list before registration, and record the decision so the list can be audited later.

What is the difference between custom search attributes and list filters in practice?

A search attribute is the indexed field that a workflow sets while it runs, and a list filter is the query operators use to find workflows by those fields. The attribute must exist and be registered in the namespace before workflows can set it, and the filter only works on fields that are indexed. Engineers should test both sides together: confirm that the workflow code writes the expected value, that the filter returns the right executions, and that the query behaves correctly on the visibility store you run. Skipping the filter test is a common way to discover that an attribute is unusable during an incident.

What should a quote for custom search attributes include?

A quote should list the written scope: the attribute inventory with names, types and purpose, the namespaces covered, the visibility store and its version, the workflows that will set each attribute, and whether existing workflows are backfilled. It should show deliverables such as registration scripts or runbooks, filter test results, data classification sign-off and the handover to your team. Ask which items are one-time and which recur, such as updates when new workflow types are added. Also confirm what you must provide, including the access and test environment described above, and how changes to scope after signing are priced.

How DeployOpen works on this

DeployOpen scopes Temporal custom search attributes as part of the wider Temporal design, so the attributes match the lookups operators actually need. The work is delivered as a fixed-scope engagement inside infrastructure you control, with registration, filters and handover documented for your team.

How we scope

  • We list the operator lookups you need, such as customer, order or status, before choosing any attribute names or types.
  • The written scope names each attribute, its type, the namespaces it applies to and the sensitive fields excluded from it.
  • We confirm your visibility store choice and version support, since custom attributes depend on it, before build starts.

How we build

  • We define and register the search attributes per namespace, using a reviewed, repeatable process in your environment.
  • We write and test list filter queries against representative workflow executions to confirm each lookup returns the expected results.
  • We review workflow code that sets attribute values so identifiers are stored as agreed and personal data stays out of the index.

How we hand over

  • You receive a catalog of attributes with types, owners, permitted values and the namespaces where each one is registered.
  • Runbooks cover adding a new attribute, changing a registration and checking that list filters still return expected results.
  • Your engineers receive a walkthrough of the filter examples and the data handling rules that apply to every new attribute.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer, including reviews when new attributes are requested.
  • We can retest list filters after Temporal Server upgrades or visibility store changes that affect your registrations.
  • Before a security or compliance review, we can prepare evidence showing which attributes exist and how sensitive data is kept out.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.