**Source URL:** https://limited.veevavault.dev/safety/mdl/component-types/integrationrule

# 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 [MDL Documentation](/mdl/documentation/overview#Vault_Components).

Learn about [Integration Rules in the SDK Documentation](/vault-sdk/sdk-integrations/spark-messaging/integration-rules).

| Attribute | Metadata | Description |
| --- | --- | --- |
| `label` | Type: String Max length: 60 | UI-friendly string in the Vault's base language. |
| `active` | Type: Boolean | Indicates whether the component is active. |
| `connection` | Type: String **Required** Max length: 40 | Reference to the connection record by `api_name__sys`. |
| `integration_point` | Type: String Max 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: String Max 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

| Attribute | Metadata | Description |
| --- | --- | --- |
| `label` | Type: String Max length: 60 | UI-friendly string in the Vault's base language. |
| `active` | Type: Boolean | Indicates whether the component is active. |
| `filter_clause` | Type: Expression Max length: 4000 | A [Criteria VQL expression](https://developer.veevavault.com/vql/#Filter_Clause) containing the logic for this query object rule. |
| `query_object` | Type: String **Required** Max length: 1500 | Name of the mapped query object `object_name__c`. Must be specified as returned in the VQL response. |

### Fieldrule

| Attribute | Metadata | Description |
| --- | --- | --- |
| `label` | Type: String Max length: 60 | UI-friendly string in the Vault's base language. |
| `active` | Type: Boolean | Indicates whether the component is active. |
| `query_object` | Type: String Max length: 100 | Name of the mapped query object `object_name__c`. Must be specified as returned in the VQL response. |
| `query_field` | Type: String Max 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: Enum Allowed values: picklist; object; objectlifecyclestate; documentlifecyclestate; documenttype; generic; lifecyclestate | The type of the `reference_lookup`. `lifecyclestate` is deprecated as of 19R2.2. Use either `objectlifecyclestate` or `documentlifecyclestate`. |
| `reference_lookup` | Type: String Max length: 45 | Set field based on a reference lookup from the `reference_lookup__sys` object. |
| `field_default` | Type: String Max length: 1500 | Mapping to a static default. |
| `query_field_select` | Type: String Max 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: Enum Allowed values: document\_boolean\_\_sys; document\_component\_\_sys; document\_date\_\_sys; document\_datetime\_\_sys; document\_formula\_\_sys; document\_lookup\_\_sys; document\_number\_\_sys; document\_object\_reference\_\_sys; document\_picklist\_\_sys; document\_text\_\_sys; document\_url\_\_sys; vobject\_boolean\_\_sys; vobject\_component\_\_sys; vobject\_currency\_\_sys; vobject\_date\_\_sys; vobject\_datetime\_\_sys; vobject\_document\_reference\_\_sys; vobject\_formula\_\_sys; vobject\_id\_\_sys; vobject\_longtext\_\_sys; vobject\_lookup\_\_sys; vobject\_number\_\_sys; vobject\_object\_reference\_\_sys; vobject\_parent\_object\_reference\_\_sys; vobject\_picklist\_\_sys; vobject\_richtext\_\_sys; vobject\_text\_\_sys; vobject\_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_type`s. |
| `target_obj_field_ref_obj` | Type: Component |  |

### Supported Operations

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

---

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