How to enable ND configure AMP?
Enabling Auto Profile Merging
- Add Environment Parameter: Add the
AUTO_PROFILE_MERGING
environment parameter with a key of at least 20 characters when starting the Tracardi API. This key is used for hashing emails and phone numbers, etc. to aid in profile identification. Keep this key confidential and note that changing it requires the system to recreate the merging process, which can be time-consuming. - Docker Command: Set the env variable when running docker.
Replace
docker run \ -e ELASTIC_HOST=http://<elasticsearch-ip>:9200 \ -e REDIS_HOST=redis://<redis-ip>:6379 \ -e MYSQL_HOST=<mysql-ip> \ -e AUTO_PROFILE_MERGING=<your-hash-key> \ tracardi/tracardi-api:<last-version>
<elasticsearch-ip>
,<redis-ip>
,<mysql-ip>
, and<last-version>
with your respective values.
Running APM Worker
- Start APM Worker: Execute the following Docker command to run the APM Worker.
How It Works
- Merging Keys:
- The following profile fields are used as merging keys:
data.contact.email.main
data.contact.email.business
data.contact.email.private
data.contact.phone.main
data.contact.phone.business
data.contact.phone.whatsapp
data.contact.phone.mobile
- The following profile fields are used as merging keys:
- Profile Monitoring:
- Tracardi continuously monitors changes in the merging key fields and saves hashes of all changed fields (see above) in the
profile.ids
.
- Tracardi continuously monitors changes in the merging key fields and saves hashes of all changed fields (see above) in the
- Profile IDs Management:
- IDs are stored in the
profile IDs
field with specific prefixes (emm-
,emb-
,emp-
,phm-
,phw-
,phb-
,pho-
). E.g.emm-
is a prefix for main email.
- IDs are stored in the
- Merging Process:
- Profiles flagged for merging are processed by a background worker, consolidating the profiles and updating
the
ids
field with the merged profile's ID.
- Profiles flagged for merging are processed by a background worker, consolidating the profiles and updating
the