Integration is to change and/or create contacts in enKod when the following events occur in AMO CRM:
1. Set webhook (one for all events or separate for each)
If you want, for example, to subscribe your contacts to a mailing group when one event occurs, but not when another event occurs, use separate webhooks.
The manager will provide you with the URL of the webhook to be installed in AMO → AMO Market → Webhooks
2. Select the required events
We support 4 types of events, changes in which are the trigger to change/add a contact in enKod.
Customise the four events that you require.
Adding a contact in AMO → Adding/updating a contact in enKod
When adding a contact to AMO:
Changing a contact in AMO → Adding/updating a contact in enKod
When changing a contact in AMO:
Matching contact fields in AMO with data fields in enKod
A contact in AMO has two types of fields - system fields (existing initially, not displayed in the interface) and custom fields (manually created). The contact's email, phone number, first name and last name will be passed by default.
Processing system fields of a contact
In AMO, a contact has system fields:
Name | Value |
---|---|
id | contact card id |
responsible_user_id | responsible user id |
date_create | card creation date |
last_modified | date of last modification of the card |
created_user_id | creator id |
modified_user_id | modifier id |
account_id | account id |
For each system contact field that you want to pass to enKod, create a data field with a system name in the form of amo_contact_id
, amo_contact_name
, amo_contact_responsible_user_id
etc.
If you don't need to pass a field, just don't create it in enKod. Read the list of fields that we can and cannot process in this section. this section.
Processing custom fields:
In AMO, custom contact fields have their own unique id, which can be viewed here:
To pass such fields to enKod, create data fields in the service with system names in the form:
where 1 and 2 are id of user contact fields in AMO.
If you don't need to pass a field, just don't create it in enKod. Check out the list of fields we can and cannot handle in the this section.
Adding and changing a contact in enKod when adding and changing a transaction in AMO
We can only associate a transaction with a contact if a custom field named email is created for the transaction entity in AMO.
In this case we can process events:
Adding a transaction to AMO → Adding/updating a contact in enKod
When adding a transaction to AMO:
Changing a transaction in AMO → Adding/updating a contact in enKod
When changing a transaction in AMO:
Matching transaction fields in AMO with contact data fields in enKod
A transaction in AMO has two types of fields - system fields (existing initially, almost all of them are not displayed in the interface) and custom fields (created manually).
Processing of system fields of a transaction
In AMO, a transaction has system fields:
Name | Value |
---|---|
id | transaction card id |
name | transaction name |
status_id | transaction status id |
price | transaction budget |
responsible_user_id | responsible user id |
last_modified | date of last card modification |
modified_user_id | user id |
created_user_id | creator id |
date_create | creation date |
pipeline_id | funnel id |
account_id | account id |
For each system transaction field to be passed to enKod, create a data field with a system name in the form of amo_lead_id
, amo_lead_name
, amo_lead_status_id
etc.
If you don't need to pass a field, just don't create it in enKod. Read the list of fields that we can and cannot handle in this section. this section.
Processing custom fields:
In AMO, custom transaction fields have their own unique id, which can be viewed here:
To pass such fields to enKod, create data fields in the service with system names in the form:
where 1 and 2 are the id of user transaction fields in AMO.
If you don't need to pass a field, just don't create it in enKod. Check out the list of fields we can and cannot process in the this section.
From AMO to enKod can come: email, multiple emails, email and phone, phone only, multiple phones. We can get multiple fields with emails or phones if they were added manually in AMO (custom fields).
If there is invalid value in the e-mail or phone number we match (for example, e-mail without dog, letters in the phone number), we do not process such requests (for cases when only e-mail or only phone number is sent). If we receive an email and a phone number, and one of the identifiers is invalid, we will search for a contact by the second (corrected) identifier.
If the contact was found, we update its fields.
If the contact was not found - we create it.
Field in AMO | Field type in enKod |
---|---|
First Name | First and Last Name, passed by default, separated by space |
Email, passed by default. | |
Phone | Phone, transmitted by default |
id | Text or Number |
responsible_user_id | Text or Number |
date_create | Date and time |
last_modified | Date and time |
created_user_id | Text or Number |
modified_user_id | Text or Number |
account_id | Text or Number |
Field in AMO | Field type in enKod |
---|---|
id | Text or Number |
name | Text |
status_id | Text or Number |
price | Number |
responsible_user_id | Text or Number |
last_modified | Date and time |
modified_user_id | Text or Number |
created_user_id | Text or Number |
date_create | Date and time |
pipeline_id | Text or Number |
account_id | Text or Number |
Type in AMO | Type in enKod |
---|---|
Name | Name |
Phone | Phone |
Text | Text |
Number | Number |
Flag | Logical |
List | Do not process |
Multilist | Do not process |
Date | Date |
Link | Text |
Text area | Text |
Switch | Do not process |
Short address | Text |
Address | Do not process |
Birthday | Date |
Legal Entity | Do not process |
Date and time | Date and time |
File | Do not process |
If necessary, you can subscribe contacts to mailing groups when adding them to enKod. In this case the subscription will work according to the logic of «everyone, including unsubscribers», but contacts that are in Emergency or Civil Contingency will not be subscribed.
To subscribe, add the system names of the required groups after the main part of the URL in the following form:
https://wh.enkod.ru/amo/MzJjamJ1YXWZvZA==tfhodg/?groups=sysname1,sysname2