GraphQLRepositoriesfieldMapping
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.
Queries
Fields of entities { fieldMapping { … } }.
| Kind | Field | Returns |
|---|---|---|
| QUERY | getById(entityId: ID!)Returns the record with the given id, or null when there is none. Deleted records are returned as well. | FieldMappingEntity |
| QUERY | getByIds(entityIds: [ID!]!)Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well. | [FieldMappingEntity!]! |
| QUERY | getAll(limit: Int, offset: Int, filter: FieldMappingFilterInput, orderBy: [FieldMappingOrderByInput!], includeDeleted: Boolean)Returns the records that match the filter, paged with limit and offset. | [FieldMappingEntity!]! |
| QUERY | getByCriteria(filter: FieldMappingFilterInput, orderBy: [FieldMappingOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int)Returns the records that match the filter as a cursor-paginated connection. | FieldMappingEntityConnection |
| QUERY | getChangedFieldsSinceRevision(id: UUID!, revision: Int!)Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking. | [UUID!]! |
| QUERY | getForEntity(entity: EntityNameEnum!, entityApiName: String)Returns the field mappings whose source is the given record type, i.e. the mappings used to pre-fill records created from it. | [FieldMappingEntity!]! |
Mutations
| Kind | Mutation | Does | Returns |
|---|---|---|---|
| MUTATION | createFieldMapping(input: CreateFieldMappingInput!, validationLevel: [ValidationLevel!]) | Create one record | CreateFieldMappingPayload |
| MUTATION | updateFieldMapping(input: UpdateFieldMappingInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String) | Update fields | UpdateFieldMappingPayload |
| MUTATION | bulkUpdateFieldMapping(input: [CreateOrUpdateFieldMappingInput!]!, deleteInput: [DeleteFieldMappingInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput) | Create or update many; per-item results | BulkUpdateFieldMappingPayload |
| MUTATION | deleteFieldMapping(input: DeleteFieldMappingInput!) | Soft-delete | DeleteFieldMappingPayload |
Types
The types this repository uses, each with its fields and their descriptions. Types several repositories share, such as PageInfo and the filter fields, are in the types index.
FieldMappingEntity object 16 fields: isDeleteProtected, id, isDeleted, …
Rules for copying field values from a source record to a new target record, for example when a lead is qualified into an opportunity.
| Field | Type | Description |
|---|---|---|
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 pageInfo: PageInfo!, edges: [FieldMappingEntityEdge]!, totalCount: Int
Paginated list of FieldMapping records.
| Field | Type | Description |
|---|---|---|
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 node: FieldMappingEntity, cursor: String!
A Relay edge containing a FieldMappingEntity and its cursor.
| Field | Type | Description |
|---|---|---|
node | FieldMappingEntity | The item at the end of the edge |
cursor | String! | A cursor for use in pagination |
FieldMappingFilterInput input AND, OR, NOT, globalSearchQuery, one condition per field
Filter conditions for FieldMapping records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.
| Input field | Type | Description |
|---|---|---|
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 eq: [FieldMappingOperationTypeEnum!], NOT: FieldMappingOperationTypeEnumFilterInput
Conditions on an enumeration field. Several conditions given together must all match.
| Input field | Type | Description |
|---|---|---|
eq | [FieldMappingOperationTypeEnum!] | Matches any of the listed values. |
NOT | FieldMappingOperationTypeEnumFilterInput | Matches values that do not meet this condition. |
FieldMappingOrderByInput input Asc or Desc per field
Sorting of FieldMapping records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.
| Input field | Type | Description |
|---|---|---|
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 5 fields: sourceEntityName, sourceEntityApiName, targetEntityName, …
Field values of a new FieldMapping record.
| Input field | Type | Description |
|---|---|---|
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 10 fields: clientMutationId, id, modified, …
Field values of a FieldMapping record to create, or to update when its id is set.
| Input field | Type | Description |
|---|---|---|
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 clientMutationId: String, id: ID!
Id of the FieldMapping record to delete.
| Input field | Type | Description |
|---|---|---|
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 sourceValue: String!, targetValue: String
One translation of a source value to a target value.
| Input field | Type | Description |
|---|---|---|
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 options: [EntityOperationMappingOptionParams]
Translation of values when a field value is copied to another field, such as from one dropdown option to another.
| Input field | Type | Description |
|---|---|---|
options | [EntityOperationMappingOptionParams] | Source-to-target value translations applied when copying the field. |
EntityTypeFieldMappingParams input sourceTypeIds: [ID!], targetTypeIds: [ID!], mapping: FieldMappingTemplateParams
Field mapping that applies to specific record types of the source and target records.
| Input field | Type | Description |
|---|---|---|
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 fieldId: ID!, operation: FieldMappingOperationEnum, triggeredRecordFieldId: UUID, mapping: EntityOperationMappingParams
How one field of the target record is filled by a field mapping.
| Input field | Type | Description |
|---|---|---|
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 input: JSONString!, operations: [FieldMappingOperationParams]!
Field-to-field mapping of a field mapping: default values and per-field operations for the target record.
| Input field | Type | Description |
|---|---|---|
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: UUID!, mapping: FieldMappingTemplateParams, typeMappings: [EntityTypeFieldMappingParams!]
Id of a FieldMapping record and the field values to change.
| Input field | Type | Description |
|---|---|---|
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: BulkUpdateResults!
Result of the bulkUpdateFieldMapping mutation.
| Field | Type | Description |
|---|---|---|
result | BulkUpdateResults! | Ids of the created, updated and deleted records, and the items that failed. |
CreateFieldMappingPayload object fieldMapping: FieldMappingEntity
Result of the createFieldMapping mutation.
| Field | Type | Description |
|---|---|---|
fieldMapping | FieldMappingEntity | The created record. |
DeleteFieldMappingPayload object fieldMapping: FieldMappingEntity, clientMutationId: String
Result of the deleteFieldMapping mutation.
| Field | Type | Description |
|---|---|---|
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 fieldMapping: FieldMappingEntity
Result of the updateFieldMapping mutation.
| Field | Type | Description |
|---|---|---|
fieldMapping | FieldMappingEntity | The updated record. |
EntityOperationMapping object options: [EntityOperationMappingOption]
Translation of values when a field value is copied to another field, such as from one dropdown option to another.
| Field | Type | Description |
|---|---|---|
options | [EntityOperationMappingOption] | Source-to-target value translations applied when copying the field. |
EntityOperationMappingOption object sourceValue: String!, targetValue: String
One translation of a source value to a target value.
| Field | Type | Description |
|---|---|---|
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 sourceTypeIds: [ID!], targetTypeIds: [ID!], mapping: FieldMappingTemplate
Field mapping that applies to specific record types of the source and target records.
| Field | Type | Description |
|---|---|---|
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 fieldId: ID!, operation: FieldMappingOperationEnum, triggeredRecordFieldId: UUID, mapping: EntityOperationMapping
How one field of the target record is filled by a field mapping.
| Field | Type | Description |
|---|---|---|
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 Custom, SourceRecordValue
How a field mapping fills a target field.
| Value | Description |
|---|---|
Custom | Value comes from the mapping configuration. |
SourceRecordValue | Value is copied from a field of the source record (triggeredRecordFieldId). |
FieldMappingOperationTypeEnum enum Default, Qualification, FollowUp, Parent, QualificationAndAutocreate, Conversion
Situation in which a field mapping pre-fills a new record from a source record.
| Value | Description |
|---|---|
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 input: JSONString!, operations: [FieldMappingOperation]!
Field-to-field mapping of a field mapping: default values and per-field operations for the target record.
| Field | Type | Description |
|---|---|---|
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. |