Skip to content

To write valid VQL queries, you must adhere to specific lexical rules regarding case sensitivity and the handling of special characters. This section defines the ground rules for how the VQL parser interprets your query string.

The following table shows which parts of a VQL query are case sensitive.

Note: In v14.0+, you can use the CASEINSENSITIVE({field}) function to bypass case sensitivity.

CategorySpecification
VQL KeywordsCase insensitive. You can enter SELECT, FROM, and WHERE in upper or lowercase. We use uppercase as a convention in this documentation.
Field & Object NamesCase sensitive. You must enter field and object names such as name__v, documents, and product__v in lower-case. This does not apply to the id field name on documents (only), which may be entered as id or ID. Older API versions include some mixed-case field names. Retrieve field names to confirm correct formatting.
Field ValuesCase sensitive. By default, all field values are case sensitive. This applies to all field type values and picklist values. For example, using the filter name__v = 'cholecap' (where name__v is a String field type) returns no results if the field value is Cholecap.

Several escape sequences for special characters are supported on all document fields, object fields, and other VQL endpoints.

NameEscape SequenceBehavior When Unescaped
Backslash ()\\Returns error unless used in escape sequence
Single quote (')\' or '' (two single quotes)Creates query string
Double quote (")\"Creates exact match query in FIND clause and literal " elsewhere
Percent sign (%)\%Acts as wildcard in LIKE clause and literal % elsewhere
Asterisk (*)\*Acts as wildcard in FIND clause and literal * elsewhere
Line feed\nLiteral n
Tab\tLiteral t
Carriage return\rLiteral r

Prior to v21.3, escape characters were not standardized and may behave differently.

You can include Vault tokens in queries made using API v22.2+. Vault resolves tokens in the query response. Vault API does not support Custom tokens.

Tokens must be formatted as ${Vault.my_token__c}.

Vault does not resolve tokens when they are wrapped in single quotes.