Skip to content

/AWS1/CL_CUS=>MERGEPROFILES()

About 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:

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

    2. When there are conflicting fields:

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

      2. 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).

Method Signature

IMPORTING

Required arguments:

iv_domainname TYPE /AWS1/CUSNAME /AWS1/CUSNAME

The unique name of the domain.

iv_mainprofileid TYPE /AWS1/CUSUUID /AWS1/CUSUUID

The identifier of the profile to be taken.

it_profileidstobemerged TYPE /AWS1/CL_CUSPFLIDTOBEMERGEDL00=>TT_PROFILEIDTOBEMERGEDLIST TT_PROFILEIDTOBEMERGEDLIST

The identifier of the profile to be merged into MainProfileId.

Optional arguments:

io_fieldsourceprofileids TYPE REF TO /AWS1/CL_CUSFIELDSOURCEPFLIDS /AWS1/CL_CUSFIELDSOURCEPFLIDS

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.

RETURNING

oo_output TYPE REF TO /aws1/cl_cusmergeprofilesrsp /AWS1/CL_CUSMERGEPROFILESRSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_cus~mergeprofiles(
  io_fieldsourceprofileids = new /aws1/cl_cusfieldsourcepflids(
    it_attributes = VALUE /aws1/cl_cusattrsourceidmap_w=>tt_attributesourceidmap(
      (
        VALUE /aws1/cl_cusattrsourceidmap_w=>ts_attributesourceidmap_maprow(
          key = |string|
          value = new /aws1/cl_cusattrsourceidmap_w( |string| )
        )
      )
    )
    iv_accountnumber = |string|
    iv_additionalinformation = |string|
    iv_address = |string|
    iv_billingaddress = |string|
    iv_birthdate = |string|
    iv_businessemailaddress = |string|
    iv_businessname = |string|
    iv_businessphonenumber = |string|
    iv_emailaddress = |string|
    iv_firstname = |string|
    iv_gender = |string|
    iv_homephonenumber = |string|
    iv_lastname = |string|
    iv_mailingaddress = |string|
    iv_middlename = |string|
    iv_mobilephonenumber = |string|
    iv_partytype = |string|
    iv_personalemailaddress = |string|
    iv_phonenumber = |string|
    iv_shippingaddress = |string|
  )
  it_profileidstobemerged = VALUE /aws1/cl_cuspflidtobemergedl00=>tt_profileidtobemergedlist(
    ( new /aws1/cl_cuspflidtobemergedl00( |string| ) )
  )
  iv_domainname = |string|
  iv_mainprofileid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_message = lo_result->get_message( ).
ENDIF.