# Merge ## Merge two accounts `client.Merge.MergeAccounts(ctx, body) (*MergeMergeAccountsResponse, error)` **post** `/v1/accounts/merge` Merges two accounts into one. The primary account retains its ID; the duplicate is soft-deleted. **[Required scopes](/using-the-api/scopes/):** `accounts:update` + `accounts:delete` **[Rate limit category](/using-the-api/rate-limits/):** Write ### Parameters - `body MergeMergeAccountsParams` - `DuplicateID param.Field[string]` ID of the duplicate record to merge into the primary and then discard. - `PrimaryID param.Field[string]` ID of the record to keep. - `FieldResolutions param.Field[map[string, MergeMergeAccountsParamsFieldResolutionUnion]]` Per-field resolution overrides keyed by attribute slug. - `type MergeMergeAccountsParamsFieldResolutionString string` - `const MergeMergeAccountsParamsFieldResolutionStringPrimary MergeMergeAccountsParamsFieldResolutionString = "primary"` - `const MergeMergeAccountsParamsFieldResolutionStringDuplicate MergeMergeAccountsParamsFieldResolutionString = "duplicate"` - `type MergeMergeAccountsParamsFieldResolutionValue struct{…}` - `Value MergeMergeAccountsParamsFieldResolutionValueValueUnion` - `string` - `float64` - `bool` - `type MergeMergeAccountsParamsFieldResolutionValueValueArray []string` - `type MergeMergeAccountsParamsFieldResolutionValueValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MergeMergeAccountsParamsFieldResolutionValueValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `Options param.Field[MergeMergeAccountsParamsOptions]` - `MultiSelectUnion bool` When true, multi-select fields are merged by union rather than primary-takes-all. ### Returns - `type MergeMergeAccountsResponse struct{…}` - `Merge MergeMergeAccountsResponseMerge` - `ID string` Unique identifier for the merge operation. - `Status string` Current status of the merge: `cleanup_pending`, `done`, or `failed`. - `Primary MergeMergeAccountsResponsePrimary` - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, MergeMergeAccountsResponsePrimaryField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value MergeMergeAccountsResponsePrimaryFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type MergeMergeAccountsResponsePrimaryFieldValueArray []string` - `type MergeMergeAccountsResponsePrimaryFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MergeMergeAccountsResponsePrimaryFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const MergeMergeAccountsResponsePrimaryFieldValueTypeAddress MergeMergeAccountsResponsePrimaryFieldValueType = "ADDRESS"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeCheckbox MergeMergeAccountsResponsePrimaryFieldValueType = "CHECKBOX"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeCurrency MergeMergeAccountsResponsePrimaryFieldValueType = "CURRENCY"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeDatetime MergeMergeAccountsResponsePrimaryFieldValueType = "DATETIME"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeEmail MergeMergeAccountsResponsePrimaryFieldValueType = "EMAIL"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeFullName MergeMergeAccountsResponsePrimaryFieldValueType = "FULL_NAME"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeMarkdown MergeMergeAccountsResponsePrimaryFieldValueType = "MARKDOWN"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeMultiSelect MergeMergeAccountsResponsePrimaryFieldValueType = "MULTI_SELECT"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeNumber MergeMergeAccountsResponsePrimaryFieldValueType = "NUMBER"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeSingleSelect MergeMergeAccountsResponsePrimaryFieldValueType = "SINGLE_SELECT"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeSocialHandle MergeMergeAccountsResponsePrimaryFieldValueType = "SOCIAL_HANDLE"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeTelephone MergeMergeAccountsResponsePrimaryFieldValueType = "TELEPHONE"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeText MergeMergeAccountsResponsePrimaryFieldValueType = "TEXT"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeURL MergeMergeAccountsResponsePrimaryFieldValueType = "URL"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeHTML MergeMergeAccountsResponsePrimaryFieldValueType = "HTML"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, MergeMergeAccountsResponsePrimaryRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. - `Summary MergeMergeAccountsResponseSummary` - `FieldWriteCount int64` Number of attribute fields written onto the primary record. - `SyncRepointedCount int64` Number of related records re-pointed from the duplicate to the primary. - `Warnings []string` Non-fatal warnings from the merge (e.g. skipped transfers). ### Example ```go package main import ( "context" "fmt" "github.com/Lightfld/lightfield-go" "github.com/Lightfld/lightfield-go/option" ) func main() { client := githubcomlightfldlightfieldgo.NewClient( option.WithAPIKey("My API Key"), ) mergeMergeAccountsResponse, err := client.Merge.MergeAccounts(context.TODO(), githubcomlightfldlightfieldgo.MergeMergeAccountsParams{ DuplicateID: "duplicateId", PrimaryID: "primaryId", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", mergeMergeAccountsResponse.Merge) } ``` #### Response ```json { "merge": { "id": "id", "status": "status" }, "primary": { "id": "id", "createdAt": "createdAt", "fields": { "foo": { "value": "string", "valueType": "ADDRESS" } }, "httpLink": "httpLink", "relationships": { "foo": { "cardinality": "cardinality", "objectType": "objectType", "values": [ "string" ] } }, "updatedAt": "updatedAt", "externalId": "externalId" }, "summary": { "fieldWriteCount": -9007199254740991, "syncRepointedCount": -9007199254740991, "warnings": [ "string" ] } } ``` ## Merge two contacts `client.Merge.MergeContacts(ctx, body) (*MergeMergeContactsResponse, error)` **post** `/v1/contacts/merge` Merges two contacts into one. The primary contact retains its ID; the duplicate is soft-deleted. **[Required scopes](/using-the-api/scopes/):** `contacts:update` + `contacts:delete` **[Rate limit category](/using-the-api/rate-limits/):** Write ### Parameters - `body MergeMergeContactsParams` - `DuplicateID param.Field[string]` ID of the duplicate record to merge into the primary and then discard. - `PrimaryID param.Field[string]` ID of the record to keep. - `FieldResolutions param.Field[map[string, MergeMergeContactsParamsFieldResolutionUnion]]` Per-field resolution overrides keyed by attribute slug. - `type MergeMergeContactsParamsFieldResolutionString string` - `const MergeMergeContactsParamsFieldResolutionStringPrimary MergeMergeContactsParamsFieldResolutionString = "primary"` - `const MergeMergeContactsParamsFieldResolutionStringDuplicate MergeMergeContactsParamsFieldResolutionString = "duplicate"` - `type MergeMergeContactsParamsFieldResolutionValue struct{…}` - `Value MergeMergeContactsParamsFieldResolutionValueValueUnion` - `string` - `float64` - `bool` - `type MergeMergeContactsParamsFieldResolutionValueValueArray []string` - `type MergeMergeContactsParamsFieldResolutionValueValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MergeMergeContactsParamsFieldResolutionValueValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `Options param.Field[MergeMergeContactsParamsOptions]` - `MultiSelectUnion bool` When true, multi-select fields are merged by union rather than primary-takes-all. ### Returns - `type MergeMergeContactsResponse struct{…}` - `Merge MergeMergeContactsResponseMerge` - `ID string` Unique identifier for the merge operation. - `Status string` Current status of the merge: `cleanup_pending`, `done`, or `failed`. - `Primary MergeMergeContactsResponsePrimary` - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, MergeMergeContactsResponsePrimaryField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value MergeMergeContactsResponsePrimaryFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type MergeMergeContactsResponsePrimaryFieldValueArray []string` - `type MergeMergeContactsResponsePrimaryFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MergeMergeContactsResponsePrimaryFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const MergeMergeContactsResponsePrimaryFieldValueTypeAddress MergeMergeContactsResponsePrimaryFieldValueType = "ADDRESS"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeCheckbox MergeMergeContactsResponsePrimaryFieldValueType = "CHECKBOX"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeCurrency MergeMergeContactsResponsePrimaryFieldValueType = "CURRENCY"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeDatetime MergeMergeContactsResponsePrimaryFieldValueType = "DATETIME"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeEmail MergeMergeContactsResponsePrimaryFieldValueType = "EMAIL"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeFullName MergeMergeContactsResponsePrimaryFieldValueType = "FULL_NAME"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeMarkdown MergeMergeContactsResponsePrimaryFieldValueType = "MARKDOWN"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeMultiSelect MergeMergeContactsResponsePrimaryFieldValueType = "MULTI_SELECT"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeNumber MergeMergeContactsResponsePrimaryFieldValueType = "NUMBER"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeSingleSelect MergeMergeContactsResponsePrimaryFieldValueType = "SINGLE_SELECT"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeSocialHandle MergeMergeContactsResponsePrimaryFieldValueType = "SOCIAL_HANDLE"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeTelephone MergeMergeContactsResponsePrimaryFieldValueType = "TELEPHONE"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeText MergeMergeContactsResponsePrimaryFieldValueType = "TEXT"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeURL MergeMergeContactsResponsePrimaryFieldValueType = "URL"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeHTML MergeMergeContactsResponsePrimaryFieldValueType = "HTML"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, MergeMergeContactsResponsePrimaryRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. - `Summary MergeMergeContactsResponseSummary` - `FieldWriteCount int64` Number of attribute fields written onto the primary record. - `SyncRepointedCount int64` Number of related records re-pointed from the duplicate to the primary. - `Warnings []string` Non-fatal warnings from the merge (e.g. skipped transfers). ### Example ```go package main import ( "context" "fmt" "github.com/Lightfld/lightfield-go" "github.com/Lightfld/lightfield-go/option" ) func main() { client := githubcomlightfldlightfieldgo.NewClient( option.WithAPIKey("My API Key"), ) mergeMergeContactsResponse, err := client.Merge.MergeContacts(context.TODO(), githubcomlightfldlightfieldgo.MergeMergeContactsParams{ DuplicateID: "duplicateId", PrimaryID: "primaryId", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", mergeMergeContactsResponse.Merge) } ``` #### Response ```json { "merge": { "id": "id", "status": "status" }, "primary": { "id": "id", "createdAt": "createdAt", "fields": { "foo": { "value": "string", "valueType": "ADDRESS" } }, "httpLink": "httpLink", "relationships": { "foo": { "cardinality": "cardinality", "objectType": "objectType", "values": [ "string" ] } }, "updatedAt": "updatedAt", "externalId": "externalId" }, "summary": { "fieldWriteCount": -9007199254740991, "syncRepointedCount": -9007199254740991, "warnings": [ "string" ] } } ``` ## Merge two opportunities `client.Merge.MergeOpportunities(ctx, body) (*MergeMergeOpportunitiesResponse, error)` **post** `/v1/opportunities/merge` Merges two opportunities into one. The primary opportunity retains its ID; the duplicate is soft-deleted. Both opportunities must belong to the same account. **[Required scopes](/using-the-api/scopes/):** `opportunities:update` + `opportunities:delete` **[Rate limit category](/using-the-api/rate-limits/):** Write ### Parameters - `body MergeMergeOpportunitiesParams` - `DuplicateID param.Field[string]` ID of the duplicate record to merge into the primary and then discard. - `PrimaryID param.Field[string]` ID of the record to keep. - `FieldResolutions param.Field[map[string, MergeMergeOpportunitiesParamsFieldResolutionUnion]]` Per-field resolution overrides keyed by attribute slug. - `type MergeMergeOpportunitiesParamsFieldResolutionString string` - `const MergeMergeOpportunitiesParamsFieldResolutionStringPrimary MergeMergeOpportunitiesParamsFieldResolutionString = "primary"` - `const MergeMergeOpportunitiesParamsFieldResolutionStringDuplicate MergeMergeOpportunitiesParamsFieldResolutionString = "duplicate"` - `type MergeMergeOpportunitiesParamsFieldResolutionValue struct{…}` - `Value MergeMergeOpportunitiesParamsFieldResolutionValueValueUnion` - `string` - `float64` - `bool` - `type MergeMergeOpportunitiesParamsFieldResolutionValueValueArray []string` - `type MergeMergeOpportunitiesParamsFieldResolutionValueValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MergeMergeOpportunitiesParamsFieldResolutionValueValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `Options param.Field[MergeMergeOpportunitiesParamsOptions]` - `MultiSelectUnion bool` When true, multi-select fields are merged by union rather than primary-takes-all. ### Returns - `type MergeMergeOpportunitiesResponse struct{…}` - `Merge MergeMergeOpportunitiesResponseMerge` - `ID string` Unique identifier for the merge operation. - `Status string` Current status of the merge: `cleanup_pending`, `done`, or `failed`. - `Primary MergeMergeOpportunitiesResponsePrimary` - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, MergeMergeOpportunitiesResponsePrimaryField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value MergeMergeOpportunitiesResponsePrimaryFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type MergeMergeOpportunitiesResponsePrimaryFieldValueArray []string` - `type MergeMergeOpportunitiesResponsePrimaryFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MergeMergeOpportunitiesResponsePrimaryFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeAddress MergeMergeOpportunitiesResponsePrimaryFieldValueType = "ADDRESS"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeCheckbox MergeMergeOpportunitiesResponsePrimaryFieldValueType = "CHECKBOX"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeCurrency MergeMergeOpportunitiesResponsePrimaryFieldValueType = "CURRENCY"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeDatetime MergeMergeOpportunitiesResponsePrimaryFieldValueType = "DATETIME"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeEmail MergeMergeOpportunitiesResponsePrimaryFieldValueType = "EMAIL"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeFullName MergeMergeOpportunitiesResponsePrimaryFieldValueType = "FULL_NAME"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeMarkdown MergeMergeOpportunitiesResponsePrimaryFieldValueType = "MARKDOWN"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeMultiSelect MergeMergeOpportunitiesResponsePrimaryFieldValueType = "MULTI_SELECT"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeNumber MergeMergeOpportunitiesResponsePrimaryFieldValueType = "NUMBER"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeSingleSelect MergeMergeOpportunitiesResponsePrimaryFieldValueType = "SINGLE_SELECT"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeSocialHandle MergeMergeOpportunitiesResponsePrimaryFieldValueType = "SOCIAL_HANDLE"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeTelephone MergeMergeOpportunitiesResponsePrimaryFieldValueType = "TELEPHONE"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeText MergeMergeOpportunitiesResponsePrimaryFieldValueType = "TEXT"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeURL MergeMergeOpportunitiesResponsePrimaryFieldValueType = "URL"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeHTML MergeMergeOpportunitiesResponsePrimaryFieldValueType = "HTML"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, MergeMergeOpportunitiesResponsePrimaryRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. - `Summary MergeMergeOpportunitiesResponseSummary` - `FieldWriteCount int64` Number of attribute fields written onto the primary record. - `SyncRepointedCount int64` Number of related records re-pointed from the duplicate to the primary. - `Warnings []string` Non-fatal warnings from the merge (e.g. skipped transfers). ### Example ```go package main import ( "context" "fmt" "github.com/Lightfld/lightfield-go" "github.com/Lightfld/lightfield-go/option" ) func main() { client := githubcomlightfldlightfieldgo.NewClient( option.WithAPIKey("My API Key"), ) mergeMergeOpportunitiesResponse, err := client.Merge.MergeOpportunities(context.TODO(), githubcomlightfldlightfieldgo.MergeMergeOpportunitiesParams{ DuplicateID: "duplicateId", PrimaryID: "primaryId", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", mergeMergeOpportunitiesResponse.Merge) } ``` #### Response ```json { "merge": { "id": "id", "status": "status" }, "primary": { "id": "id", "createdAt": "createdAt", "fields": { "foo": { "value": "string", "valueType": "ADDRESS" } }, "httpLink": "httpLink", "relationships": { "foo": { "cardinality": "cardinality", "objectType": "objectType", "values": [ "string" ] } }, "updatedAt": "updatedAt", "externalId": "externalId" }, "summary": { "fieldWriteCount": -9007199254740991, "syncRepointedCount": -9007199254740991, "warnings": [ "string" ] } } ``` ## Merge two custom object records `client.Merge.MergeObjectValues(ctx, entitySlug, body) (*MergeMergeObjectValuesResponse, error)` **post** `/v1/objects/{entitySlug}/merge` Merges two records of the specified custom object type into one. The primary record retains its ID; the duplicate is soft-deleted. Both records must belong to the custom object type named in the path. **[Required scopes](/using-the-api/scopes/):** `custom_objects:update` + `custom_objects:delete` **[Rate limit category](/using-the-api/rate-limits/):** Write ### Parameters - `entitySlug string` The slug of the custom object type. - `body MergeMergeObjectValuesParams` - `DuplicateID param.Field[string]` ID of the duplicate record to merge into the primary and then discard. - `PrimaryID param.Field[string]` ID of the record to keep. - `FieldResolutions param.Field[map[string, MergeMergeObjectValuesParamsFieldResolutionUnion]]` Per-field resolution overrides keyed by attribute slug. - `type MergeMergeObjectValuesParamsFieldResolutionString string` - `const MergeMergeObjectValuesParamsFieldResolutionStringPrimary MergeMergeObjectValuesParamsFieldResolutionString = "primary"` - `const MergeMergeObjectValuesParamsFieldResolutionStringDuplicate MergeMergeObjectValuesParamsFieldResolutionString = "duplicate"` - `type MergeMergeObjectValuesParamsFieldResolutionValue struct{…}` - `Value MergeMergeObjectValuesParamsFieldResolutionValueValueUnion` - `string` - `float64` - `bool` - `type MergeMergeObjectValuesParamsFieldResolutionValueValueArray []string` - `type MergeMergeObjectValuesParamsFieldResolutionValueValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MergeMergeObjectValuesParamsFieldResolutionValueValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `Options param.Field[MergeMergeObjectValuesParamsOptions]` - `MultiSelectUnion bool` When true, multi-select fields are merged by union rather than primary-takes-all. ### Returns - `type MergeMergeObjectValuesResponse struct{…}` - `Merge MergeMergeObjectValuesResponseMerge` - `ID string` Unique identifier for the merge operation. - `Status string` Current status of the merge: `cleanup_pending`, `done`, or `failed`. - `Primary MergeMergeObjectValuesResponsePrimary` - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, MergeMergeObjectValuesResponsePrimaryField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value MergeMergeObjectValuesResponsePrimaryFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type MergeMergeObjectValuesResponsePrimaryFieldValueArray []string` - `type MergeMergeObjectValuesResponsePrimaryFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MergeMergeObjectValuesResponsePrimaryFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeAddress MergeMergeObjectValuesResponsePrimaryFieldValueType = "ADDRESS"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeCheckbox MergeMergeObjectValuesResponsePrimaryFieldValueType = "CHECKBOX"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeCurrency MergeMergeObjectValuesResponsePrimaryFieldValueType = "CURRENCY"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeDatetime MergeMergeObjectValuesResponsePrimaryFieldValueType = "DATETIME"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeEmail MergeMergeObjectValuesResponsePrimaryFieldValueType = "EMAIL"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeFullName MergeMergeObjectValuesResponsePrimaryFieldValueType = "FULL_NAME"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeMarkdown MergeMergeObjectValuesResponsePrimaryFieldValueType = "MARKDOWN"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeMultiSelect MergeMergeObjectValuesResponsePrimaryFieldValueType = "MULTI_SELECT"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeNumber MergeMergeObjectValuesResponsePrimaryFieldValueType = "NUMBER"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeSingleSelect MergeMergeObjectValuesResponsePrimaryFieldValueType = "SINGLE_SELECT"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeSocialHandle MergeMergeObjectValuesResponsePrimaryFieldValueType = "SOCIAL_HANDLE"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeTelephone MergeMergeObjectValuesResponsePrimaryFieldValueType = "TELEPHONE"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeText MergeMergeObjectValuesResponsePrimaryFieldValueType = "TEXT"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeURL MergeMergeObjectValuesResponsePrimaryFieldValueType = "URL"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeHTML MergeMergeObjectValuesResponsePrimaryFieldValueType = "HTML"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, MergeMergeObjectValuesResponsePrimaryRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. - `Summary MergeMergeObjectValuesResponseSummary` - `FieldWriteCount int64` Number of attribute fields written onto the primary record. - `SyncRepointedCount int64` Number of related records re-pointed from the duplicate to the primary. - `Warnings []string` Non-fatal warnings from the merge (e.g. skipped transfers). ### Example ```go package main import ( "context" "fmt" "github.com/Lightfld/lightfield-go" "github.com/Lightfld/lightfield-go/option" ) func main() { client := githubcomlightfldlightfieldgo.NewClient( option.WithAPIKey("My API Key"), ) mergeMergeObjectValuesResponse, err := client.Merge.MergeObjectValues( context.TODO(), "entitySlug", githubcomlightfldlightfieldgo.MergeMergeObjectValuesParams{ DuplicateID: "duplicateId", PrimaryID: "primaryId", }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", mergeMergeObjectValuesResponse.Merge) } ``` #### Response ```json { "merge": { "id": "id", "status": "status" }, "primary": { "id": "id", "createdAt": "createdAt", "fields": { "foo": { "value": "string", "valueType": "ADDRESS" } }, "httpLink": "httpLink", "relationships": { "foo": { "cardinality": "cardinality", "objectType": "objectType", "values": [ "string" ] } }, "updatedAt": "updatedAt", "externalId": "externalId" }, "summary": { "fieldWriteCount": -9007199254740991, "syncRepointedCount": -9007199254740991, "warnings": [ "string" ] } } ``` ## Get merge status `client.Merge.GetMerge(ctx, id) (*MergeGetMergeResponse, error)` **get** `/v1/merges/{id}` Returns the status and details of a merge operation by its ID. **[Rate limit category](/using-the-api/rate-limits/):** Read ### Parameters - `id string` The merge operation ID. ### Returns - `type MergeGetMergeResponse struct{…}` - `ID string` Unique identifier for the merge operation. - `CreatedAt string` ISO 8601 timestamp of when the merge was created. - `DuplicateID string` ID of the record that was merged into the primary and soft-deleted. - `EntityType string` The object type of the merged records (e.g. `account`, `contact`, `opportunity`, or a custom object slug). - `PrimaryID string` ID of the record that was kept (the primary). - `Status string` Current status of the merge: `cleanup_pending`, `done`, or `failed`. - `UpdatedAt string` ISO 8601 timestamp of when the merge was last updated. ### Example ```go package main import ( "context" "fmt" "github.com/Lightfld/lightfield-go" "github.com/Lightfld/lightfield-go/option" ) func main() { client := githubcomlightfldlightfieldgo.NewClient( option.WithAPIKey("My API Key"), ) mergeGetMergeResponse, err := client.Merge.GetMerge(context.TODO(), "id") if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", mergeGetMergeResponse.ID) } ``` #### Response ```json { "id": "id", "createdAt": "createdAt", "duplicateId": "duplicateId", "entityType": "entityType", "primaryId": "primaryId", "status": "status", "updatedAt": "updatedAt" } ``` ## Domain Types ### Merge Get Merge Response - `type MergeGetMergeResponse struct{…}` - `ID string` Unique identifier for the merge operation. - `CreatedAt string` ISO 8601 timestamp of when the merge was created. - `DuplicateID string` ID of the record that was merged into the primary and soft-deleted. - `EntityType string` The object type of the merged records (e.g. `account`, `contact`, `opportunity`, or a custom object slug). - `PrimaryID string` ID of the record that was kept (the primary). - `Status string` Current status of the merge: `cleanup_pending`, `done`, or `failed`. - `UpdatedAt string` ISO 8601 timestamp of when the merge was last updated. ### Merge Merge Accounts Response - `type MergeMergeAccountsResponse struct{…}` - `Merge MergeMergeAccountsResponseMerge` - `ID string` Unique identifier for the merge operation. - `Status string` Current status of the merge: `cleanup_pending`, `done`, or `failed`. - `Primary MergeMergeAccountsResponsePrimary` - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, MergeMergeAccountsResponsePrimaryField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value MergeMergeAccountsResponsePrimaryFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type MergeMergeAccountsResponsePrimaryFieldValueArray []string` - `type MergeMergeAccountsResponsePrimaryFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MergeMergeAccountsResponsePrimaryFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const MergeMergeAccountsResponsePrimaryFieldValueTypeAddress MergeMergeAccountsResponsePrimaryFieldValueType = "ADDRESS"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeCheckbox MergeMergeAccountsResponsePrimaryFieldValueType = "CHECKBOX"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeCurrency MergeMergeAccountsResponsePrimaryFieldValueType = "CURRENCY"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeDatetime MergeMergeAccountsResponsePrimaryFieldValueType = "DATETIME"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeEmail MergeMergeAccountsResponsePrimaryFieldValueType = "EMAIL"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeFullName MergeMergeAccountsResponsePrimaryFieldValueType = "FULL_NAME"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeMarkdown MergeMergeAccountsResponsePrimaryFieldValueType = "MARKDOWN"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeMultiSelect MergeMergeAccountsResponsePrimaryFieldValueType = "MULTI_SELECT"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeNumber MergeMergeAccountsResponsePrimaryFieldValueType = "NUMBER"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeSingleSelect MergeMergeAccountsResponsePrimaryFieldValueType = "SINGLE_SELECT"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeSocialHandle MergeMergeAccountsResponsePrimaryFieldValueType = "SOCIAL_HANDLE"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeTelephone MergeMergeAccountsResponsePrimaryFieldValueType = "TELEPHONE"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeText MergeMergeAccountsResponsePrimaryFieldValueType = "TEXT"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeURL MergeMergeAccountsResponsePrimaryFieldValueType = "URL"` - `const MergeMergeAccountsResponsePrimaryFieldValueTypeHTML MergeMergeAccountsResponsePrimaryFieldValueType = "HTML"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, MergeMergeAccountsResponsePrimaryRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. - `Summary MergeMergeAccountsResponseSummary` - `FieldWriteCount int64` Number of attribute fields written onto the primary record. - `SyncRepointedCount int64` Number of related records re-pointed from the duplicate to the primary. - `Warnings []string` Non-fatal warnings from the merge (e.g. skipped transfers). ### Merge Merge Contacts Response - `type MergeMergeContactsResponse struct{…}` - `Merge MergeMergeContactsResponseMerge` - `ID string` Unique identifier for the merge operation. - `Status string` Current status of the merge: `cleanup_pending`, `done`, or `failed`. - `Primary MergeMergeContactsResponsePrimary` - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, MergeMergeContactsResponsePrimaryField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value MergeMergeContactsResponsePrimaryFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type MergeMergeContactsResponsePrimaryFieldValueArray []string` - `type MergeMergeContactsResponsePrimaryFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MergeMergeContactsResponsePrimaryFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const MergeMergeContactsResponsePrimaryFieldValueTypeAddress MergeMergeContactsResponsePrimaryFieldValueType = "ADDRESS"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeCheckbox MergeMergeContactsResponsePrimaryFieldValueType = "CHECKBOX"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeCurrency MergeMergeContactsResponsePrimaryFieldValueType = "CURRENCY"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeDatetime MergeMergeContactsResponsePrimaryFieldValueType = "DATETIME"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeEmail MergeMergeContactsResponsePrimaryFieldValueType = "EMAIL"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeFullName MergeMergeContactsResponsePrimaryFieldValueType = "FULL_NAME"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeMarkdown MergeMergeContactsResponsePrimaryFieldValueType = "MARKDOWN"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeMultiSelect MergeMergeContactsResponsePrimaryFieldValueType = "MULTI_SELECT"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeNumber MergeMergeContactsResponsePrimaryFieldValueType = "NUMBER"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeSingleSelect MergeMergeContactsResponsePrimaryFieldValueType = "SINGLE_SELECT"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeSocialHandle MergeMergeContactsResponsePrimaryFieldValueType = "SOCIAL_HANDLE"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeTelephone MergeMergeContactsResponsePrimaryFieldValueType = "TELEPHONE"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeText MergeMergeContactsResponsePrimaryFieldValueType = "TEXT"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeURL MergeMergeContactsResponsePrimaryFieldValueType = "URL"` - `const MergeMergeContactsResponsePrimaryFieldValueTypeHTML MergeMergeContactsResponsePrimaryFieldValueType = "HTML"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, MergeMergeContactsResponsePrimaryRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. - `Summary MergeMergeContactsResponseSummary` - `FieldWriteCount int64` Number of attribute fields written onto the primary record. - `SyncRepointedCount int64` Number of related records re-pointed from the duplicate to the primary. - `Warnings []string` Non-fatal warnings from the merge (e.g. skipped transfers). ### Merge Merge Object Values Response - `type MergeMergeObjectValuesResponse struct{…}` - `Merge MergeMergeObjectValuesResponseMerge` - `ID string` Unique identifier for the merge operation. - `Status string` Current status of the merge: `cleanup_pending`, `done`, or `failed`. - `Primary MergeMergeObjectValuesResponsePrimary` - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, MergeMergeObjectValuesResponsePrimaryField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value MergeMergeObjectValuesResponsePrimaryFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type MergeMergeObjectValuesResponsePrimaryFieldValueArray []string` - `type MergeMergeObjectValuesResponsePrimaryFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MergeMergeObjectValuesResponsePrimaryFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeAddress MergeMergeObjectValuesResponsePrimaryFieldValueType = "ADDRESS"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeCheckbox MergeMergeObjectValuesResponsePrimaryFieldValueType = "CHECKBOX"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeCurrency MergeMergeObjectValuesResponsePrimaryFieldValueType = "CURRENCY"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeDatetime MergeMergeObjectValuesResponsePrimaryFieldValueType = "DATETIME"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeEmail MergeMergeObjectValuesResponsePrimaryFieldValueType = "EMAIL"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeFullName MergeMergeObjectValuesResponsePrimaryFieldValueType = "FULL_NAME"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeMarkdown MergeMergeObjectValuesResponsePrimaryFieldValueType = "MARKDOWN"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeMultiSelect MergeMergeObjectValuesResponsePrimaryFieldValueType = "MULTI_SELECT"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeNumber MergeMergeObjectValuesResponsePrimaryFieldValueType = "NUMBER"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeSingleSelect MergeMergeObjectValuesResponsePrimaryFieldValueType = "SINGLE_SELECT"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeSocialHandle MergeMergeObjectValuesResponsePrimaryFieldValueType = "SOCIAL_HANDLE"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeTelephone MergeMergeObjectValuesResponsePrimaryFieldValueType = "TELEPHONE"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeText MergeMergeObjectValuesResponsePrimaryFieldValueType = "TEXT"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeURL MergeMergeObjectValuesResponsePrimaryFieldValueType = "URL"` - `const MergeMergeObjectValuesResponsePrimaryFieldValueTypeHTML MergeMergeObjectValuesResponsePrimaryFieldValueType = "HTML"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, MergeMergeObjectValuesResponsePrimaryRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. - `Summary MergeMergeObjectValuesResponseSummary` - `FieldWriteCount int64` Number of attribute fields written onto the primary record. - `SyncRepointedCount int64` Number of related records re-pointed from the duplicate to the primary. - `Warnings []string` Non-fatal warnings from the merge (e.g. skipped transfers). ### Merge Merge Opportunities Response - `type MergeMergeOpportunitiesResponse struct{…}` - `Merge MergeMergeOpportunitiesResponseMerge` - `ID string` Unique identifier for the merge operation. - `Status string` Current status of the merge: `cleanup_pending`, `done`, or `failed`. - `Primary MergeMergeOpportunitiesResponsePrimary` - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, MergeMergeOpportunitiesResponsePrimaryField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value MergeMergeOpportunitiesResponsePrimaryFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type MergeMergeOpportunitiesResponsePrimaryFieldValueArray []string` - `type MergeMergeOpportunitiesResponsePrimaryFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MergeMergeOpportunitiesResponsePrimaryFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeAddress MergeMergeOpportunitiesResponsePrimaryFieldValueType = "ADDRESS"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeCheckbox MergeMergeOpportunitiesResponsePrimaryFieldValueType = "CHECKBOX"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeCurrency MergeMergeOpportunitiesResponsePrimaryFieldValueType = "CURRENCY"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeDatetime MergeMergeOpportunitiesResponsePrimaryFieldValueType = "DATETIME"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeEmail MergeMergeOpportunitiesResponsePrimaryFieldValueType = "EMAIL"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeFullName MergeMergeOpportunitiesResponsePrimaryFieldValueType = "FULL_NAME"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeMarkdown MergeMergeOpportunitiesResponsePrimaryFieldValueType = "MARKDOWN"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeMultiSelect MergeMergeOpportunitiesResponsePrimaryFieldValueType = "MULTI_SELECT"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeNumber MergeMergeOpportunitiesResponsePrimaryFieldValueType = "NUMBER"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeSingleSelect MergeMergeOpportunitiesResponsePrimaryFieldValueType = "SINGLE_SELECT"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeSocialHandle MergeMergeOpportunitiesResponsePrimaryFieldValueType = "SOCIAL_HANDLE"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeTelephone MergeMergeOpportunitiesResponsePrimaryFieldValueType = "TELEPHONE"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeText MergeMergeOpportunitiesResponsePrimaryFieldValueType = "TEXT"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeURL MergeMergeOpportunitiesResponsePrimaryFieldValueType = "URL"` - `const MergeMergeOpportunitiesResponsePrimaryFieldValueTypeHTML MergeMergeOpportunitiesResponsePrimaryFieldValueType = "HTML"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, MergeMergeOpportunitiesResponsePrimaryRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. - `Summary MergeMergeOpportunitiesResponseSummary` - `FieldWriteCount int64` Number of attribute fields written onto the primary record. - `SyncRepointedCount int64` Number of related records re-pointed from the duplicate to the primary. - `Warnings []string` Non-fatal warnings from the merge (e.g. skipped transfers).