Computed Field Values allow businesses to configure an algorithm to automatically populate the value for a particular field on an entity. The computation method is part of the field definition, alongside the display name, tooltip, and validation.
Computation methods can be defined for any built-in or custom field. Once defined, the computation must be triggered in order for a value to be computed. By default, a field has no computation method and must be populated explicitly for each entity.
Access Controls and Required Subscriptions
Account Feature
To use Computed Field Values, the Preview Feature: Computed Field Values must be enabled in your account. This can be turned on via Account Settings > Account Features by any user with sufficient permission. With this feature disabled, no computed field value functionality will be available.
Subscription
Using content generation in Yext requires a Content Generation subscription, which grants a capacity of words generated to an account. Without this subscription, computation methods that rely on content generation will appear as locked in the field configuration UI. At this time, all supported computation methods are content generation-based, so the full feature is unavailable without this subscription.
User Permissions
- Any user with Manage Custom Fields permission can configure computed field values.
- Any user with Edit Items With Approval or Edit access to a field that has a computation method will see the wand icon in Entity Edit. Their ability to save the computed value is consistent with their existing field permission.
- To trigger field computations, users also need the
TRIGGER_COMPUTATIONpermission.
Computation Methods
Supported Methods
| Method | Description | Supported Field Types |
|---|---|---|
| Write Web Page Body Content (Markdown) | Generates standard body content for a webpage given a set of input information such as topic, length, and structure details. Returns Markdown. | Rich-Text (v1), Markdown |
| Write a Business Description | Generates a business description. Excludes URLs. Effective for locations. | Single-line Text, Multi-line Text, Rich-Text (v1), Markdown |
| Write a Blog Post (Markdown) | Generates a blog post given inputs such as the topic and structure details. Returns Markdown. | Rich-Text (v1), Markdown |
| Write a Bio for an Individual | Generates a biography for an individual. | Single-line Text, Multi-line Text, Rich-Text (v1), Markdown |
| Write a Generic Description | Writes a description for any entity type. Flexible and effective for products, features, promotions, etc. | Single-line Text, Multi-line Text, Rich-Text (v1), Markdown |
| Write a Web Page Meta Description | Writes a meta description for a web page, intended for use in <meta> tags. |
Single-line Text, Multi-line Text, Rich-Text (v1), Markdown |
| Summarize Content | Summarizes text, given a desired length as an input. | Single-line Text, Multi-line Text, Rich-Text (v1), Markdown |
| Rewrite Content | Rewrites text using different prose. | Single-line Text, Multi-line Text, Rich-Text (v1), Markdown |
| Generate Keywords | Generates SEO-optimized keywords about a given topic. | List, Single-line Text, Multi-line Text, Rich-Text (v1), Markdown |
| Generate FAQs | Generates a list of FAQs. | FAQ built-in field, List, Single-line Text, Multi-line Text, Rich-Text (v1), Markdown, Struct of type {question: "value", answer: "value"}
|
| Custom Generative Prompt | Write a fully custom prompt for a generative model. Include any inputs and as much detail as needed for your use case. | Single-line Text, Multi-line Text, Rich-Text (v1), Markdown, Date, Boolean, Number |
Note: Methods that do not specify "Markdown" in the name return plain text. These methods are available for Rich-Text (v1) and Markdown field types since plain text is allowed in those fields, but they will not return formatted content unless explicitly instructed to do so.
Supported Field Types Per Method
Each method has a designated set of supported field types. Computation methods can only be selected for a given field if the field type is included in the method's supported field types.
Object Field Types
For Object field types, a computation method can be defined for each individual subfield, or for the entire object. This allows different logic for different properties of an object field. A computation can only be defined once per subfield — if the computation is defined for the object as a whole, individual subfield computations cannot also be defined for subfields within that object.
Field Type Support
The response format of the computed value must be compatible with the given field type, including both the format and any validation on the field.
For example, to generate content for a list-of-strings field, the output must be in list-of-strings format: ["item1", "item2", "item3"]. If validation on the field limits the list to two items, a computed value with three items will result in an error.
For fields that require a specified JSON format (any objects or lists), you can instruct the model to return data in the required format. Built-in computation methods already include these instructions.
When using a Custom Generative Prompt to generate a list field, include instructions like: Return the list as a JSON array, formatted as: ["item1", "item2"]. This does not guarantee correct formatting, but the model generally handles this type of instruction well.
Inputs
When a computation is triggered, the execution receives a set of parameters called inputs. Inputs are the user-defined data passed to the computation as it runs.
Required vs. Optional Inputs
- Required Inputs: Must be provided to save the configuration. The computation cannot execute for a particular entity profile if a required input value is not populated on that profile.
- Optional Inputs: Can be left blank. If no value is provided, or if the field value is null when executing, the input will not be passed to the computation.
Static vs. Dynamic Inputs
- Static Inputs: Defined as part of the computation method configuration. Every execution receives the exact value you provided.
-
Dynamic Inputs (Field Inputs): Reference a field using embedded field syntax (e.g.,
[[name]]). The system takes the field value from the entity profile being computed and passes it as an input. Dynamic inputs ensure the computation uses data relevant to each individual entity.
Localization
When computing a value for a particular language profile, dynamic inputs resolve to the field values on that profile:
- Computing for an English profile uses the English name and description.
- Computing for a Spanish profile uses the Spanish name and description.
Non-dynamic (static) inputs can optionally be localized. If not localized, the default input values are used. Models generally perform better when instructions are in the same language as the expected output, so localizing inputs is encouraged for alternate language profiles.
Using Fields as Dynamic Inputs
Supported References
Input field embeds support:
- All built-in and custom fields of a primitive type (strings, numbers, booleans)
- Markdown fields, using:
[[c_markdownField.markdown]] - All list fields and list properties of objects containing primitive types, as a delimited list
- All properties of built-in and custom structured fields, to any depth (as long as each path contains a single item, and the final item is a primitive type or list of primitive types)
- Certain meta properties, prefixed with
meta:
| Meta Property | Example |
|---|---|
accountId |
[[meta.accountId]] |
countryCode |
[[meta.countryCode]] |
entityType |
[[meta.entityType]] |
id |
[[meta.id]] |
language |
[[meta.language]] |
timestamp |
[[meta.timestamp]] |
uid |
[[meta.uid]] |
Not Supported
Input field embeds do not support:
- Fields on entities referenced via Entity Relationships (e.g., you cannot embed field data from a linked Location to generate content on a Doctor entity)
- Values from lists of structured objects
- Fields using the Rich Text (v2) type
- Fields and properties that are themselves structured objects (though their primitive-type properties are supported)
- Non-profile fields: Labels, Folder ID, Google Attributes, Categories, ECLs
Syntax
Field inputs use the familiar double-bracket notation: [[address.line1]]. Paths match the Entities API format. Any field available in the Entities API that matches the criteria above can be used as an input.
Rendered Value Formatting
By default, the API format is rendered (different from profile field embed behavior, where most fields return a localized format by default). Some value types support formatting cues added as suffixes to the embed syntax:
| Value Type | Cue | Description | Example Syntax | Example Value |
|---|---|---|---|---|
| Option Values | $display |
Localized option display name rather than programmatic enum value | [[c_availableColors.$display]] |
Blue, Green |
| Phone Numbers | $national |
Country-dependent national format rather than E.164 | [[mainPhone.$national]] |
(212) 555-1234 |
| Country Codes | $display |
Localized country display name rather than ISO code | [[address.countryCode.$display]] |
United States |
| Numeric Types | $display |
Localized numeric display format rather than raw numeric value | [[c_bigNumber.$display]] |
100,456,211 |
| Locale Code | $display |
Localized language name rather than locale code | [[meta.language.$display]] |
English |
Input Validation
Each input has system-defined validation. If a field value used as an input is invalid according to that validation, the computation will not execute.
For example, the Summarize Content method's Text to Summarize input has a maximum length of 5,000 characters. If the field value on a given entity exceeds that limit, the computation will not run for that entity.
Configuration as Code
Computed field values are configured as part of the field definition and can be configured via Configuration as Code as part of the field resource.
Logs
Computation logs can be queried via the Logs API by querying the /computationLogs table. Logs include what triggered the computation, the inputs sent to the model, the model's response, and whether the execution succeeded or failed.
Computation logs are not currently available in the UI.
Limitations
-
Limited configuration for ongoing computations: All dynamic inputs trigger a re-computation when changed. For example, if
nameis used as an input to generate a blog post, any change tonamewill always trigger a recomputation. - Built-in computations optimized for English: All built-in methods have execution logic optimized for English. To generate content in another language, use the Custom Generative Computation method and take advantage of localization support. Through additional instructions, you can also instruct a built-in method to output content in a different language, including dynamically based on the profile's locale.
- Limited computation method support: The current list of supported methods is limited to content generation-based methods.
- No entity relationship support in inputs: Only fields on the entity itself can be used as inputs. Traversing entity relationships to use fields from linked entities is not supported.
Input Reference
Write a Blog Post (Markdown)
| Input Name | ID (CaC) | Type | Validation |
|---|---|---|---|
| Blog Post Topic | topic |
Single-line text | Max 100 characters |
| Desired Length | length |
Single-line text | Max 25 characters |
| Number of Headers | numHeaders |
Number | Max value 5 |
| Number of Paragraphs per Header | numParasPerHeader |
Number | Max value 5 |
| Number of Sentences per Paragraph | numSentencesPerPara |
Number | Max value 10 |
| Additional Prompt Instructions for Introduction | additionalIntroInstructions |
Multi-line text | Max 2,000 characters |
| Additional Information | additionalInformation |
Multi-line text | Max 2,000 characters |
| Additional Prompt Instructions | additionalInstructions |
Multi-line text | Max 2,000 characters |
Write Markdown Web Page Body Content
| Input Name | ID (CaC) | Type | Validation |
|---|---|---|---|
| Web Page Topic | topic |
Single-line text | Max 255 characters |
| Desired Length | length |
Single-line text | Max 25 characters |
| Number of Headers | numHeaders |
Number | Max value 10 |
| Number of Paragraphs per Header | numParasPerHeader |
Number | Max value 5 |
| Number of Sentences per Paragraph | numSentencesPerPara |
Number | Max value 10 |
| Additional Information | additionalInformation |
Multi-line text | Max 2,000 characters |
| Additional Prompt Instructions | additionalInstructions |
Multi-line text | Max 2,000 characters |
Write a Business Description
| Input Name | ID (CaC) | Type | Validation |
|---|---|---|---|
| Business Name | name |
Single-line text | Max 255 characters |
| City | addressCity |
Single-line text | Max 255 characters |
| Region | addressRegion |
Single-line text | Max 255 characters |
| Country | addressCountry |
Single-line text | Max 255 characters |
| Keywords | keywords |
Multi-line text | Max 1,000 characters |
| Desired Maximum Length | maxLength |
Single-line text | Max 25 characters |
| Number of Paragraphs | numParas |
Number | Max value 5 |
| Additional Information | additionalResumeInfo |
Multi-line text | Max 2,000 characters |
| Additional Prompt Instructions | additionalInstructions |
Multi-line text | Max 2,000 characters |
Write a Bio for an Individual
| Input Name | ID (CaC) | Type | Validation |
|---|---|---|---|
| Occupation | occupation |
Single-line text | Max 255 characters |
| Business Name | name |
Single-line text | Max 255 characters |
| City | addressCity |
Single-line text | Max 255 characters |
| Region | addressRegion |
Single-line text | Max 255 characters |
| Country | addressCountry |
Single-line text | Max 255 characters |
| Background | background |
Single-line text | Max 5,000 characters |
| Certifications | certifications |
Single-line text | Max 1,000 characters |
| Areas of Expertise | areasOfExpertise |
Single-line text | Max 1,000 characters |
| Years of Experience | yearsOfExperience |
Single-line text | Max 255 characters |
| Hobbies | hobbies |
Single-line text | Max 1,000 characters |
| Interests | interests |
Single-line text | Max 1,000 characters |
| Additional Information | additionalResumeInfo |
Multi-line text | Max 2,000 characters |
| Additional Prompt Instructions | additionalInstructions |
Multi-line text | Max 2,000 characters |
| Desired Maximum Length | maxLength |
Single-line text | Max 25 characters |
Write a Generic Description
| Input Name | ID (CaC) | Type | Validation |
|---|---|---|---|
| Subject Type | subjectType |
Single-line text | Max 255 characters |
| Subject Details | subjectDetails |
Single-line text | Max 2,000 characters |
| Additional Prompt Instructions | additionalInstructions |
Multi-line text | Max 2,000 characters |
| Desired Maximum Length | maxLength |
Single-line text | Max 25 characters |
Write a Web Page Meta Description
| Input Name | ID (CaC) | Type | Validation |
|---|---|---|---|
| Web Page Topic | topic |
Single-line text | Max 255 characters |
| Additional Information | additionalInfo |
Multi-line text | Max 2,000 characters |
| Additional Prompt Instructions | additionalInstructions |
Multi-line text | Max 2,000 characters |
Summarize Content
| Input Name | ID (CaC) | Type | Validation |
|---|---|---|---|
| Text to Summarize | textToSummarize |
Single-line text | Max 10,000 characters |
| Desired Maximum Length | maxLength |
Single-line text | Max 25 characters |
| Additional Prompt Instructions | additionalInstructions |
Multi-line text | Max 2,000 characters |
Rewrite Content
| Input Name | ID (CaC) | Type | Validation |
|---|---|---|---|
| Text to Rewrite | textToRewrite |
Single-line text | Max 10,000 characters |
| Output Format | outputFormat |
Single-line text | Max 100 characters |
| Additional Prompt Instructions | additionalInstructions |
Multi-line text | Max 2,000 characters |
Generate Keywords
| Input Name | ID (CaC) | Type | Validation |
|---|---|---|---|
| Topic | topic |
Single-line text | Max 10,000 characters |
| Desired Number of Keywords | numKeywords |
Number | Max value 50 |
| Additional Prompt Instructions | additionalInstructions |
Multi-line text | Max 2,000 characters |
Generate FAQs
| Input Name | ID (CaC) | Type | Validation |
|---|---|---|---|
| Topic | topic |
Single-line text | Max 10,000 characters |
| Desired Number of FAQs | numFaqs |
Number | Max value 50 |
| Additional Context | context |
Multi-line text | Max 2,000 characters |
| Additional Prompt Instructions | additionalInstructions |
Multi-line text | Max 2,000 characters |
Custom Generative Computation
| Input Name | ID (CaC) | Type | Validation |
|---|---|---|---|
| Prompt | prompt |
Multi-line text | Max 10,000 characters |
| Maximum Tokens | maximumTokens |
Number | Max value 2,000 |
| Prefix | prefix |
Multi-line text | Max 2,000 characters |