**Source URL:** https://general.veevavault.dev/regulatory/mdl/component-types/integrationrule.md

# Integrationrule

**Class: ** `metadata`

Integration Rules provide platform configuration and SDK services for developers building Vault to Vault integration features that require data mapping. Note that deleting an `Integrationrule` record with the `DROP` command also deletes any child `Queryobjectrule` and `Fieldrule` subcomponent records. Similarly, inactivating an `Integrationrule` record by changing its `active` attribute value to `false` also inactivates any associated subcomponent records. Learn more in the <a href="/mdl/documentation/overview#Vault_Components">MDL Documentation</a>.

Learn about <a href="/vault-sdk/sdk-integrations/spark-messaging/integration-rules">Integration Rules in the SDK Documentation</a>.

| Attribute | Metadata | Description |
| --- | --- | --- |
| label | Type: StringMax length: 60 | UI-friendly string in the Vault's base language. |
| active | Type: Boolean | Indicates whether the component is active. |
| connection | Type: StringRequiredMax length: 40 | Reference to the connection record by api_name__sys. |
| integration_point | Type: StringMax length: 40 | Reference to Integration Point by API Name to allow for defining and retrieving of specific Integration Rules related to the Connection and Integration Point. |
| primary_query_object | Type: StringMax length: 1500 | Constrains this integration rule to a particular object or document and allows access to the relationships on that object or document. If omitted, field rules are not constrained and cannot access relationships. |

### Queryobjectrule {#queryobjectrule}

| Attribute | Metadata | Description |
| --- | --- | --- |
| label | Type: StringMax length: 60 | UI-friendly string in the Vault's base language. |
| active | Type: Boolean | Indicates whether the component is active. |
| filter_clause | Type: ExpressionMax length: 4000 | A Criteria VQL expression containing the logic for this query object rule. |
| query_object | Type: StringRequiredMax length: 1500 | Name of the mapped query object object_name__c.  Must be specified as returned in the VQL response. |

### Fieldrule {#fieldrule}

| Attribute | Metadata | Description |
| --- | --- | --- |
| label | Type: StringMax length: 60 | UI-friendly string in the Vault's base language. |
| active | Type: Boolean | Indicates whether the component is active. |
| query_object | Type: StringMax length: 100 | Name of the mapped query object object_name__c.  Must be specified as returned in the VQL response. |
| query_field | Type: StringMax length: 100 | Name of the mapped query field (field_name__c). For example, name__v or doc_number__v. |
| target_object | Type: Component | References the Object if the target is an Object. |
| target_object_field | Type: Subcomponent | Subcomponent reference to the Object field. This is required if the target_object is set. |
| target_docfield | Type: Component | References the Docfield if the target is a Document. |
| reference_lookup_type | Type: EnumAllowed values:picklistobjectobjectlifecyclestatedocumentlifecyclestatedocumenttypegenericlifecyclestate | The type of the reference_lookup. lifecyclestate is deprecated as of 19R2.2. Use either objectlifecyclestate or documentlifecyclestate. |
| reference_lookup | Type: StringMax length: 45 | Set field based on a reference lookup from the reference_lookup__sys object. |
| field_default | Type: StringMax length: 1500 | Mapping to a static default. |
| query_field_select | Type: StringMax length: 255 | If populated, overrides the query_field. Used in cases where you need to transform the data with a VQL function such as TONAME(). If an alias (AS) exists in this field, that alias must also exist in the query_field. |
| query_field_type | Type: EnumAllowed values:document_boolean__sysdocument_component__sysdocument_date__sysdocument_datetime__sysdocument_formula__sysdocument_lookup__sysdocument_number__sysdocument_object_reference__sysdocument_picklist__sysdocument_text__sysdocument_url__sysvobject_boolean__sysvobject_component__sysvobject_currency__sysvobject_date__sysvobject_datetime__sysvobject_document_reference__sysvobject_formula__sysvobject_id__sysvobject_longtext__sysvobject_lookup__sysvobject_number__sysvobject_object_reference__sysvobject_parent_object_reference__sysvobject_picklist__sysvobject_richtext__sysvobject_text__sysvobject_attachment__sys | The type (object or document) and data type of the query field. |
| target_field_lookup | Type: Subcomponent | If target_object_field is an object reference field corresponding to an object with an outbound relationship to this field rule's target_object, this is a set field which is a unique field related to the object referenced in the field rule’s target_object. Only supported for object query_field_types. |
| target_obj_field_ref_obj | Type: Component |  |

### Supported Operations {#supported-operations}

| Operation | Support |
| --- | --- |
| Create | Yes |
| Recreate | Yes |
| Alter | Yes |
| Drop | Yes |
| Rename | Yes |
| Describe | Yes |
| Generate Recreate | Yes |
| Queryable | Yes |


---

**Previous:** [Inboundemailaddress](/regulatory/mdl/component-types/inboundemailaddress)  
**Next:** [Job](/regulatory/mdl/component-types/job)