CustomerProfiles / Client / get_segment_membership

get_segment_membership#

CustomerProfiles.Client.get_segment_membership(**kwargs)#

Determines if the given profiles are within a segment.

See also: AWS API Documentation

Request Syntax

response = client.get_segment_membership(
    DomainName='string',
    SegmentDefinitionName='string',
    ProfileIds=[
        'string',
    ]
)
Parameters:
  • DomainName (string) –

    [REQUIRED]

    The unique name of the domain.

  • SegmentDefinitionName (string) –

    [REQUIRED]

    The Id of the wanted segment. Needs to be a valid, and existing segment Id.

  • ProfileIds (list) –

    [REQUIRED]

    The list of profile IDs to query for.

    • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'SegmentDefinitionName': 'string',
    'Profiles': [
        {
            'ProfileId': 'string',
            'QueryResult': 'PRESENT'|'ABSENT',
            'Profile': {
                'ProfileId': 'string',
                'AccountNumber': 'string',
                'AdditionalInformation': 'string',
                'PartyType': 'INDIVIDUAL'|'BUSINESS'|'OTHER',
                'BusinessName': 'string',
                'FirstName': 'string',
                'MiddleName': 'string',
                'LastName': 'string',
                'BirthDate': 'string',
                'Gender': 'MALE'|'FEMALE'|'UNSPECIFIED',
                'PhoneNumber': 'string',
                'MobilePhoneNumber': 'string',
                'HomePhoneNumber': 'string',
                'BusinessPhoneNumber': 'string',
                'EmailAddress': 'string',
                'PersonalEmailAddress': 'string',
                'BusinessEmailAddress': 'string',
                'Address': {
                    'Address1': 'string',
                    'Address2': 'string',
                    'Address3': 'string',
                    'Address4': 'string',
                    'City': 'string',
                    'County': 'string',
                    'State': 'string',
                    'Province': 'string',
                    'Country': 'string',
                    'PostalCode': 'string'
                },
                'ShippingAddress': {
                    'Address1': 'string',
                    'Address2': 'string',
                    'Address3': 'string',
                    'Address4': 'string',
                    'City': 'string',
                    'County': 'string',
                    'State': 'string',
                    'Province': 'string',
                    'Country': 'string',
                    'PostalCode': 'string'
                },
                'MailingAddress': {
                    'Address1': 'string',
                    'Address2': 'string',
                    'Address3': 'string',
                    'Address4': 'string',
                    'City': 'string',
                    'County': 'string',
                    'State': 'string',
                    'Province': 'string',
                    'Country': 'string',
                    'PostalCode': 'string'
                },
                'BillingAddress': {
                    'Address1': 'string',
                    'Address2': 'string',
                    'Address3': 'string',
                    'Address4': 'string',
                    'City': 'string',
                    'County': 'string',
                    'State': 'string',
                    'Province': 'string',
                    'Country': 'string',
                    'PostalCode': 'string'
                },
                'Attributes': {
                    'string': 'string'
                },
                'FoundByItems': [
                    {
                        'KeyName': 'string',
                        'Values': [
                            'string',
                        ]
                    },
                ],
                'PartyTypeString': 'string',
                'GenderString': 'string'
            }
        },
    ],
    'Failures': [
        {
            'ProfileId': 'string',
            'Message': 'string',
            'Status': 123
        },
    ]
}

Response Structure

  • (dict) –

    • SegmentDefinitionName (string) –

      The unique name of the segment definition.

    • Profiles (list) –

      An array of maps where each contains a response per profile requested.

      • (dict) –

        Object that holds the results for membership.

        • ProfileId (string) –

          The profile id the result belongs to.

        • QueryResult (string) –

          Describes whether the profile was absent or present in the segment.

        • Profile (dict) –

          The standard profile of a customer.

          • ProfileId (string) –

            The unique identifier of a customer profile.

          • AccountNumber (string) –

            An account number that you have given to the customer.

          • AdditionalInformation (string) –

            Any additional information relevant to the customer’s profile.

          • PartyType (string) –

            The type of profile used to describe the customer.

          • BusinessName (string) –

            The name of the customer’s business.

          • FirstName (string) –

            The customer’s first name.

          • MiddleName (string) –

            The customer’s middle name.

          • LastName (string) –

            The customer’s last name.

          • BirthDate (string) –

            The customer’s birth date.

          • Gender (string) –

            The gender with which the customer identifies.

          • PhoneNumber (string) –

            The customer’s phone number, which has not been specified as a mobile, home, or business number.

          • MobilePhoneNumber (string) –

            The customer’s mobile phone number.

          • HomePhoneNumber (string) –

            The customer’s home phone number.

          • BusinessPhoneNumber (string) –

            The customer’s home phone number.

          • EmailAddress (string) –

            The customer’s email address, which has not been specified as a personal or business address.

          • PersonalEmailAddress (string) –

            The customer’s personal email address.

          • BusinessEmailAddress (string) –

            The customer’s business email address.

          • Address (dict) –

            A generic address associated with the customer that is not mailing, shipping, or billing.

            • Address1 (string) –

              The first line of a customer address.

            • Address2 (string) –

              The second line of a customer address.

            • Address3 (string) –

              The third line of a customer address.

            • Address4 (string) –

              The fourth line of a customer address.

            • City (string) –

              The city in which a customer lives.

            • County (string) –

              The county in which a customer lives.

            • State (string) –

              The state in which a customer lives.

            • Province (string) –

              The province in which a customer lives.

            • Country (string) –

              The country in which a customer lives.

            • PostalCode (string) –

              The postal code of a customer address.

          • ShippingAddress (dict) –

            The customer’s shipping address.

            • Address1 (string) –

              The first line of a customer address.

            • Address2 (string) –

              The second line of a customer address.

            • Address3 (string) –

              The third line of a customer address.

            • Address4 (string) –

              The fourth line of a customer address.

            • City (string) –

              The city in which a customer lives.

            • County (string) –

              The county in which a customer lives.

            • State (string) –

              The state in which a customer lives.

            • Province (string) –

              The province in which a customer lives.

            • Country (string) –

              The country in which a customer lives.

            • PostalCode (string) –

              The postal code of a customer address.

          • MailingAddress (dict) –

            The customer’s mailing address.

            • Address1 (string) –

              The first line of a customer address.

            • Address2 (string) –

              The second line of a customer address.

            • Address3 (string) –

              The third line of a customer address.

            • Address4 (string) –

              The fourth line of a customer address.

            • City (string) –

              The city in which a customer lives.

            • County (string) –

              The county in which a customer lives.

            • State (string) –

              The state in which a customer lives.

            • Province (string) –

              The province in which a customer lives.

            • Country (string) –

              The country in which a customer lives.

            • PostalCode (string) –

              The postal code of a customer address.

          • BillingAddress (dict) –

            The customer’s billing address.

            • Address1 (string) –

              The first line of a customer address.

            • Address2 (string) –

              The second line of a customer address.

            • Address3 (string) –

              The third line of a customer address.

            • Address4 (string) –

              The fourth line of a customer address.

            • City (string) –

              The city in which a customer lives.

            • County (string) –

              The county in which a customer lives.

            • State (string) –

              The state in which a customer lives.

            • Province (string) –

              The province in which a customer lives.

            • Country (string) –

              The country in which a customer lives.

            • PostalCode (string) –

              The postal code of a customer address.

          • Attributes (dict) –

            A key value pair of attributes of a customer profile.

            • (string) –

              • (string) –

          • FoundByItems (list) –

            A list of items used to find a profile returned in a SearchProfiles response. An item is a key-value(s) pair that matches an attribute in the profile.

            If the optional AdditionalSearchKeys parameter was included in the SearchProfiles request, the FoundByItems list should be interpreted based on the LogicalOperator used in the request:

            • AND - The profile included in the response matched all of the search keys specified in the request. The FoundByItems will include all of the key-value(s) pairs that were specified in the request (as this is a requirement of AND search logic).

            • OR - The profile included in the response matched at least one of the search keys specified in the request. The FoundByItems will include each of the key-value(s) pairs that the profile was found by.

            The OR relationship is the default behavior if the LogicalOperator parameter is not included in the SearchProfiles request.

            • (dict) –

              A data type pair that consists of a KeyName and Values list that were used to find a profile returned in response to a SearchProfiles request.

              • KeyName (string) –

                A searchable identifier of a customer profile.

              • Values (list) –

                A list of key values.

                • (string) –

          • PartyTypeString (string) –

            An alternative to PartyType which accepts any string as input.

          • GenderString (string) –

            An alternative to Gender which accepts any string as input.

    • Failures (list) –

      An array of maps where each contains a response per profile failed for the request.

      • (dict) –

        Object that holds failures for membership.

        • ProfileId (string) –

          The profile id the failure belongs to.

        • Message (string) –

          A message describing the failure.

        • Status (integer) –

          The status describing the failure.

Exceptions