---
title: entities.fieldMapping
description: Read field mapping records with the fieldMapping repository, and change them with the field mapping mutations. Same records as the REST FieldMappings entity.
canonical: https://developers.coevera.com/reference/graphql/field-mapping/
section: graphql
verification: schema
generatedFrom: schema f155746 (2026-10-20)
publisher: Coevera
---

# entities.fieldMapping

Read field mapping records with the fieldMapping repository, and change them with the field mapping mutations. Same records as the REST FieldMappings entity.

REST: [FieldMappings](https://developers.coevera.com/reference/rest/field-mappings.md).

## Queries

- `getById(entityId: ID!): FieldMappingEntity` Returns the record with the given id, or null when there is none. Deleted records are returned as well.
- `getByIds(entityIds: [ID!]!): [FieldMappingEntity!]!` Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well.
- `getAll(limit: Int, offset: Int, filter: FieldMappingFilterInput, orderBy: [FieldMappingOrderByInput!], includeDeleted: Boolean): [FieldMappingEntity!]!` Returns the records that match the filter, paged with limit and offset.
- `getByCriteria(filter: FieldMappingFilterInput, orderBy: [FieldMappingOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int): FieldMappingEntityConnection` Returns the records that match the filter as a cursor-paginated connection.
- `getChangedFieldsSinceRevision(id: UUID!, revision: Int!): [UUID!]!` Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking.
- `getForEntity(entity: EntityNameEnum!, entityApiName: String): [FieldMappingEntity!]!` Returns the field mappings whose source is the given record type, i.e. the mappings used to pre-fill records created from it.

## Mutations

- `createFieldMapping(input: CreateFieldMappingInput!, validationLevel: [ValidationLevel!]): CreateFieldMappingPayload` Create one record.
- `updateFieldMapping(input: UpdateFieldMappingInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String): UpdateFieldMappingPayload` Update fields.
- `bulkUpdateFieldMapping(input: [CreateOrUpdateFieldMappingInput!]!, deleteInput: [DeleteFieldMappingInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput): BulkUpdateFieldMappingPayload` Create or update many; per-item results.
- `deleteFieldMapping(input: DeleteFieldMappingInput!): DeleteFieldMappingPayload` Soft-delete.

## Types

### FieldMappingEntity (object)

Rules for copying field values from a source record to a new target record, for example when a lead is qualified into an opportunity.

- `isDeleteProtected: Boolean!` True when the record is protected against deletion because it must always exist in the space. Deleting a record that is not protected can still fail on other checks. Read-only.
- `id: ID!` Unique identifier of entity.
- `isDeleted: Boolean` Specifies if the entity is considered deleted.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `isSystem: Boolean!` True when the mapping is shipped by the platform and cannot be deleted by the user.
- `mapping: FieldMappingTemplate` Default field-to-field mapping template applied when no per-type-pair mapping matches.
- `operation: FieldMappingOperationTypeEnum` Situation in which the mapping pre-fills a new target record from a source record, such as qualifying a lead into an opportunity or creating a follow-up activity.
- `sourceEntityApiName: String` API name of the source custom entity. Set only when sourceEntityName is "CustomEntity"; otherwise empty.
- `targetEntityApiName: String` API name of the target custom entity. Set only when targetEntityName is "CustomEntity"; otherwise empty.
- `typeMappings: [EntityTypeFieldMapping!]` Per-type-pair field mappings: each entry binds a set of source/target type ids and the field-to-field mapping that applies when both types match.
- `revision: Int` Revision when entity was lastly changed.
- `sourceEntityName: EntityNameEnum!` Source entity kind for the mapping (e.g. Lead, Account, Contact). Returns "CustomEntity" when the source is a custom entity; the API name is then exposed via sourceEntityApiName.
- `targetEntityName: EntityNameEnum!` Target entity kind for the mapping (e.g. Lead, Account, Contact). Returns "CustomEntity" when the target is a custom entity; the API name is then exposed via targetEntityApiName.
- `documents: [CloudObjectRelationEntity!]` Files attached to the mapping (e.g. import source files).
- `instancePermissions: [EntityPermsEnum!]! (1 args)` Permissions the current user has on this record, out of the requested ones.

### FieldMappingEntityConnection (object)

Paginated list of FieldMapping records.

- `pageInfo: PageInfo!` Pagination data for this connection.
- `edges: [FieldMappingEntityEdge]!` Contains the nodes in this connection.
- `totalCount: Int` Total number of items in the connection.

### FieldMappingEntityEdge (object)

A Relay edge containing a `FieldMappingEntity` and its cursor.

- `node: FieldMappingEntity` The item at the end of the edge
- `cursor: String!` A cursor for use in pagination

### FieldMappingFilterInput (input)

Filter conditions for FieldMapping records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.

- `OR: [FieldMappingFilterInput!]` Matches records that meet at least one of the listed filters.
- `AND: [FieldMappingFilterInput!]` Matches records that meet all of the listed filters.
- `NOT: FieldMappingFilterInput` Matches records that do not meet this filter.
- `globalSearchQuery: String` Search term matched against the fields that the global search covers for this entity.
- `id: EntityFilterStringField` Unique identifier of entity.
- `isDeleted: Boolean` Specifies if the entity is considered deleted.
- `modified: EntityFilterDateTimeField` Last modification time.
- `created: EntityFilterDateTimeField` Creation time.
- `isSystem: Boolean` True when the mapping is shipped by the platform and cannot be deleted by the user.
- `operation: FieldMappingOperationTypeEnumFilterInput` Situation in which the mapping pre-fills a new target record from a source record, such as qualifying a lead into an opportunity or creating a follow-up activity.
- `revision: EntityFilterNumberField` Revision when entity was lastly changed.
- `documents: CloudObjectRelationFilterInput` Files attached to the mapping (e.g. import source files). Matches records where a related record meets these conditions.

### FieldMappingOperationTypeEnumFilterInput (input)

Conditions on an enumeration field. Several conditions given together must all match.

- `eq: [FieldMappingOperationTypeEnum!]` Matches any of the listed values.
- `NOT: FieldMappingOperationTypeEnumFilterInput` Matches values that do not meet this condition.

### FieldMappingOrderByInput (input)

Sorting of FieldMapping records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.

- `id: OrderByEnum` Unique identifier of entity.
- `isDeleted: OrderByEnum` Specifies if the entity is considered deleted.
- `modified: OrderByEnum` Last modification time.
- `created: OrderByEnum` Creation time.
- `isSystem: OrderByEnum` True when the mapping is shipped by the platform and cannot be deleted by the user.
- `revision: OrderByEnum` Revision when entity was lastly changed.

### CreateFieldMappingInput (input)

Field values of a new FieldMapping record.

- `sourceEntityName: EntityNameEnum!` Entity of the source records (e.g. Lead); CustomEntity for a custom entity identified by sourceEntityApiName.
- `sourceEntityApiName: String` API name of the source custom entity; set it when sourceEntityName is CustomEntity.
- `targetEntityName: EntityNameEnum!` Entity of the records the mapping pre-fills (e.g. Opportunity); CustomEntity for a custom entity identified by targetEntityApiName.
- `targetEntityApiName: String` API name of the target custom entity; set it when targetEntityName is CustomEntity.
- `operation: FieldMappingOperationTypeEnum` Situation in which the mapping applies; only Default and Conversion mappings can be created. Default when not set.

### CreateOrUpdateFieldMappingInput (input)

Field values of a FieldMapping record to create, or to update when its id is set.

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `id: ID` Unique identifier of entity.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `isSystem: Boolean` True when the mapping is shipped by the platform and cannot be deleted by the user.
- `mapping: FieldMappingTemplateJSONString` Default field-to-field mapping template applied when no per-type-pair mapping matches.
- `operation: FieldMappingOperationTypeEnum` Situation in which the mapping pre-fills a new target record from a source record, such as qualifying a lead into an opportunity or creating a follow-up activity.
- `typeMappings: [EntityTypeFieldMappingJSONString!]` Per-type-pair field mappings: each entry binds a set of source/target type ids and the field-to-field mapping that applies when both types match.
- `revision: Int` Revision when entity was lastly changed.
- `documents: [CreateCloudObjectRelationNoBackrefInput!]` Files attached to the mapping (e.g. import source files).

### DeleteFieldMappingInput (input)

Id of the FieldMapping record to delete.

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `id: ID!` Unique identifier of entity.

### EntityOperationMappingOptionParams (input)

One translation of a source value to a target value.

- `sourceValue: String!` Value on the source field that this option maps from.
- `targetValue: String` Value the source value is translated to on the target field.

### EntityOperationMappingParams (input)

Translation of values when a field value is copied to another field, such as from one dropdown option to another.

- `options: [EntityOperationMappingOptionParams]` Source-to-target value translations applied when copying the field.

### EntityTypeFieldMappingParams (input)

Field mapping that applies to specific record types of the source and target records.

- `sourceTypeIds: [ID!]` Source entity-type ids this mapping applies to.
- `targetTypeIds: [ID!]` Target entity-type ids this mapping applies to.
- `mapping: FieldMappingTemplateParams` Field-to-field mapping used when both the source and target types match.

### FieldMappingOperationParams (input)

How one field of the target record is filled by a field mapping.

- `fieldId: ID!` Id of the target field this operation populates.
- `operation: FieldMappingOperationEnum` How the target field value is produced — Custom (from a mapping) or SourceRecordValue (copied from the source record).
- `triggeredRecordFieldId: UUID` Id of the source-record field whose value is used when the operation reads from the source record.
- `mapping: EntityOperationMappingParams` Source-to-target value translations applied to the field value.

### FieldMappingTemplateParams (input)

Field-to-field mapping of a field mapping: default values and per-field operations for the target record.

- `input: JSONString!` JSON object holding the default field values for the target record, keyed by field id.
- `operations: [FieldMappingOperationParams]!` Per-field operations that derive each target field value from the source record or a value mapping.

### UpdateFieldMappingInput (input)

Id of a FieldMapping record and the field values to change.

- `id: UUID!` Id of the field mapping to update.
- `mapping: FieldMappingTemplateParams` Default field-to-field mapping, applied when no per-type mapping matches. A field can appear only once in its operations.
- `typeMappings: [EntityTypeFieldMappingParams!]` Per-type-pair field mappings: each binds source and target type ids to the mapping applied when both types match. A field can appear only once in the operations of each mapping.

### BulkUpdateFieldMappingPayload (object)

Result of the bulkUpdateFieldMapping mutation.

- `result: BulkUpdateResults!` Ids of the created, updated and deleted records, and the items that failed.

### CreateFieldMappingPayload (object)

Result of the createFieldMapping mutation.

- `fieldMapping: FieldMappingEntity` The created record.

### DeleteFieldMappingPayload (object)

Result of the deleteFieldMapping mutation.

- `fieldMapping: FieldMappingEntity` The deleted record.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### UpdateFieldMappingPayload (object)

Result of the updateFieldMapping mutation.

- `fieldMapping: FieldMappingEntity` The updated record.

### EntityOperationMapping (object)

Translation of values when a field value is copied to another field, such as from one dropdown option to another.

- `options: [EntityOperationMappingOption]` Source-to-target value translations applied when copying the field.

### EntityOperationMappingOption (object)

One translation of a source value to a target value.

- `sourceValue: String!` Value on the source field that this option maps from.
- `targetValue: String` Value the source value is translated to on the target field.

### EntityTypeFieldMapping (object)

Field mapping that applies to specific record types of the source and target records.

- `sourceTypeIds: [ID!]` Source entity-type ids this mapping applies to.
- `targetTypeIds: [ID!]` Target entity-type ids this mapping applies to.
- `mapping: FieldMappingTemplate` Field-to-field mapping used when both the source and target types match.

### FieldMappingOperation (object)

How one field of the target record is filled by a field mapping.

- `fieldId: ID!` Id of the target field this operation populates.
- `operation: FieldMappingOperationEnum` How the target field value is produced — Custom (from a mapping) or SourceRecordValue (copied from the source record).
- `triggeredRecordFieldId: UUID` Id of the source-record field whose value is used when the operation reads from the source record.
- `mapping: EntityOperationMapping` Source-to-target value translations applied to the field value.

### FieldMappingOperationEnum (enum)

How a field mapping fills a target field.

- `Custom` Value comes from the mapping configuration.
- `SourceRecordValue` Value is copied from a field of the source record (triggeredRecordFieldId).

### FieldMappingOperationTypeEnum (enum)

Situation in which a field mapping pre-fills a new record from a source record.

- `Default` Creating a related record from another record.
- `Qualification` Qualifying a lead into an opportunity.
- `FollowUp` Creating a follow-up task or appointment from an activity.
- `Parent` Creating a child account from its parent account.
- `QualificationAndAutocreate` Creating an account or contact automatically from lead data during qualification.
- `Conversion` Converting a record into a record of another type.

### FieldMappingTemplate (object)

Field-to-field mapping of a field mapping: default values and per-field operations for the target record.

- `input: JSONString!` JSON object holding the default field values for the target record, keyed by field id.
- `operations: [FieldMappingOperation]!` Per-field operations that derive each target field value from the source record or a value mapping.

Types several repositories share, such as `PageInfo` and the filter fields, are in the [types index](https://developers.coevera.com/reference/graphql/types.md). The [SDL](https://developers.coevera.com/graphql/schema.graphql) has the whole schema in one file.

## Example

```graphql
query FirstFieldMappings {
  entities {
    fieldMapping {
      getByCriteria(first: 3, orderBy: [{ modified: Desc }]) {
        totalCount
        edges { node { id modified } }
      }
    }
  }
}
```

```bash
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"query FirstFieldMappings { entities { fieldMapping { getByCriteria(first: 3, orderBy: [{ modified: Desc }]) { totalCount edges { node { id modified } } } } } }"}'
```
