• 沒有找到結果。

MergeProfiles

Runs an AWS Lambda job that does the following:

1. All the profileKeys in the ProfileToBeMerged will be moved to the main profile.

2. All the objects in the ProfileToBeMerged will be moved to the main profile.

3. All the ProfileToBeMerged will be deleted at the end.

4. All the profileKeys in the ProfileIdsToBeMerged will be moved to the main profile.

5. Standard fields are merged as follows:

a. Fields are always "union"-ed if there are no conflicts in standard fields or attributeKeys.

b. When there are conflicting fields:

i. If no SourceProfileIds entry is specified, the main Profile value is always taken.

ii. If a SourceProfileIds entry is specified, the specified profileId is always taken, even if it is a NULL value.

You can use MergeProfiles together with GetMatches, which returns potentially matching profiles, or use it with the results of another matching system. After profiles have been merged, they cannot be separated (unmerged).

Request Syntax

POST /domains/DomainName/profiles/objects/merge HTTP/1.1 Content-type: application/json

{

"FieldSourceProfileIds": { "AccountNumber": "string",

"AdditionalInformation": "string", "Address": "string",

"Attributes": { "string" : "string"

},

"BillingAddress": "string", "BirthDate": "string",

"BusinessEmailAddress": "string", "BusinessName": "string",

"BusinessPhoneNumber": "string", "EmailAddress": "string",

"FirstName": "string", "Gender": "string",

"HomePhoneNumber": "string", "LastName": "string", "MailingAddress": "string", "MiddleName": "string", "MobilePhoneNumber": "string", "PartyType": "string",

"PersonalEmailAddress": "string", "PhoneNumber": "string",

"ShippingAddress": "string"

},

"MainProfileId": "string",

"ProfileIdsToBeMerged": [ "string" ] }

URI Request Parameters

URI Request Parameters

The request uses the following URI parameters.

DomainName (p. 107)

The unique name of the domain.

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z0-9_-]+$

Required: Yes

Request Body

The request accepts the following data in JSON format.

FieldSourceProfileIds (p. 107)

The identifiers of the fields in the profile that has the information you want to apply to the merge.

For example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier of the EmailAddress field in Profile1.

Type: FieldSourceProfileIds (p. 175) object Required: No

MainProfileId (p. 107)

The identifier of the profile to be taken.

Type: String

Pattern: [a-f0-9]{32}

Required: Yes

ProfileIdsToBeMerged (p. 107)

The identifier of the profile to be merged into MainProfileId.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 20 items.

Pattern: [a-f0-9]{32}

Required: Yes

Response Syntax

HTTP/1.1 200

Content-type: application/json { "Message": "string"

Response Elements

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Message (p. 108)

A message that indicates the merge request is complete.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors (p. 229).

BadRequestException

The input you provided is invalid.

HTTP Status Code: 400 InternalServerException

An internal service error occurred.

HTTP Status Code: 500 ResourceNotFoundException

The requested resource does not exist, or access was denied.

HTTP Status Code: 404 ThrottlingException

You exceeded the maximum number of requests.

HTTP Status Code: 429

Examples

Example 1

Fields are always "union"-ed if there are no conflicts in standard fields or attributeKeys.

MainProfile: {

"FirstName": "Jane"

}

ProfileToBeMerged1: { "LastName": "Doe"

}

ProfileToBeMerged2: { "MiddleName": "None"

Examples

}

mergeOf(MainProfile, [ProfileToBeMerged1, ProfileToBeMerged2] // Yields a MainProfile that looks like the following:

MainProfile: {

When there are conflicting fields, if no SourceProfileIds entry is specified, the main Profile value is always taken.

MainProfile: {

"FirstName": "Jane"

}

ProfileToBeMerged1: { "LastName": "Doe"

}

ProfileToBeMerged2: {

"FirstName": "Jorge" // Note that this has conflict with MainProfile }

mergeOf(MainProfile, [ProfileToBeMerged1, ProfileToBeMerged2] // Yields a MainProfile that looks like the following:

MainProfile: {

"FirstName": "Jane", // "Jane" stays as that is what MainProfile is "LastName": "Doe"

}

Example 3

When there are conflicting fields, if a SourceProfileIds entry is specified, the specified profileId is always taken, even if it is a NULL value.

MainProfile: {

"FirstName": "Jane"

}

ProfileToBeMerged1: { "LastName": "Doe"

}

ProfileToBeMerged2: {

"FirstName": "Jorge" // Note that this has conflict with MainProfile }

SourceProfileIds: {

"FirstName": "secondaryProfile2"

}

mergeOf(MainProfile, [ProfileToBeMerged1, ProfileToBeMerged2] // Yields a MainProfile that looks like the following:

MainProfile: {

"FirstName": "Jorge", // "Jorge" gets picked because SourceProfileIds is specified "LastName": "Doe"

}

See Also

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

PutIntegration

PutIntegration

Adds an integration between the service and a third-party service, which includes Amazon AppFlow and Amazon Connect.

An integration can belong to only one domain.

Request Syntax

PUT /domains/DomainName/integrations HTTP/1.1 Content-type: application/json

{ "FlowDefinition": { "Description": "string", "FlowName": "string", "KmsArn": "string", "SourceFlowConfig": {

"ConnectorProfileName": "string", "ConnectorType": "string",

URI Request Parameters

"ObjectTypeName": "string", "ObjectTypeNames": { "string" : "string"

},

"Tags": {

"string" : "string"

},

"Uri": "string"

}

URI Request Parameters

The request uses the following URI parameters.

DomainName (p. 112)

The unique name of the domain.

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z0-9_-]+$

Required: Yes

Request Body

The request accepts the following data in JSON format.

FlowDefinition (p. 112)

The configuration that controls how Customer Profiles retrieves data from the source.

Type: FlowDefinition (p. 179) object Required: No

ObjectTypeName (p. 112)

The name of the profile object type.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: ^[a-zA-Z_][a-zA-Z_0-9-]*$

Required: No

Response Syntax

ObjectTypeNames (p. 112)

A map in which each key is an event type from an external application such as Segment or Shopify, and each value is an ObjectTypeName (template) used to ingest the event.

It supports the following event types: SegmentIdentify, ShopifyCreateCustomers, ShopifyUpdateCustomers, ShopifyCreateDraftOrders, ShopifyUpdateDraftOrders, ShopifyCreateOrders, and ShopifyUpdatedOrders.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 255.

Value Length Constraints: Minimum length of 1. Maximum length of 255.

Value Pattern: ^[a-zA-Z_][a-zA-Z_0-9-]*$

Required: No Tags (p. 112)

The tags used to organize, track, or control access for this resource.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[a-zA-Z+-=._:/]+$

Value Length Constraints: Maximum length of 256.

Required: No Uri (p. 112)

The URI of the S3 bucket or any other type of data source.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: No

Response Syntax

HTTP/1.1 200

Content-type: application/json {

"CreatedAt": number, "DomainName": "string", "LastUpdatedAt": number, "ObjectTypeName": "string", "ObjectTypeNames": { "string" : "string"

},

"Tags": {

"string" : "string"

},

"Uri": "string", "WorkflowId": "string"

Response Elements

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

CreatedAt (p. 114)

The timestamp of when the domain was created.

Type: Timestamp DomainName (p. 114)

The unique name of the domain.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z0-9_-]+$

LastUpdatedAt (p. 114)

The timestamp of when the domain was most recently edited.

Type: Timestamp ObjectTypeName (p. 114)

The name of the profile object type.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: ^[a-zA-Z_][a-zA-Z_0-9-]*$

ObjectTypeNames (p. 114)

A map in which each key is an event type from an external application such as Segment or Shopify, and each value is an ObjectTypeName (template) used to ingest the event.

It supports the following event types: SegmentIdentify, ShopifyCreateCustomers, ShopifyUpdateCustomers, ShopifyCreateDraftOrders, ShopifyUpdateDraftOrders, ShopifyCreateOrders, and ShopifyUpdatedOrders.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 255.

Value Length Constraints: Minimum length of 1. Maximum length of 255.

Value Pattern: ^[a-zA-Z_][a-zA-Z_0-9-]*$

Tags (p. 114)

The tags used to organize, track, or control access for this resource.

Type: String to string map

Map Entries: Maximum number of 50 items.

Errors

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[a-zA-Z+-=._:/]+$

Value Length Constraints: Maximum length of 256.

Uri (p. 114)

The URI of the S3 bucket or any other type of data source.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

WorkflowId (p. 114)

Unique identifier for the workflow.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 229).

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 403 BadRequestException

The input you provided is invalid.

HTTP Status Code: 400 InternalServerException

An internal service error occurred.

HTTP Status Code: 500 ResourceNotFoundException

The requested resource does not exist, or access was denied.

HTTP Status Code: 404 ThrottlingException

You exceeded the maximum number of requests.

HTTP Status Code: 429

Examples

Example

This example illustrates one usage of PutIntegration.

See Also

Sample Request

PUT /domains/ExampleDomainName/integrations HTTP/1.1 Content-type: application/json

{ "ObjectTypeName": "MyCustomObject",

"Uri": "arn:aws:flow:us-east-1:123456789012:URIOfIntegration1"

}

Sample Response

Content-type: application/json { "CreatedAt": 1479249799770,

"DomainName": "ExampleDomainName", "LastUpdatedAt": 1479249799770, "ObjectTypeName": "MyCustomObject",

"Uri": "arn:aws:flow:us-east-1:123456789012:URIOfIntegration1"

}

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3