Profiles import and data update
How to import data
There are three ways to proceed to import data:
- Under Data, select Profile Databases. Click on “Import Customer Profiles” next to the profile database you want and select the appropriate way to load the data:
- Select your desired Profile Database and click on the Browse tab
Click on the icon at the top of the screen and select the import method that suits you:
- In the Data section select Import.
Customer profiles import and update can be organized depending on database size, new subscribers processing scenario (directly or from CRM), and company technical capabilities. There are 4 ways to import profiles into a database:
Manual import — add one profile at a time using the edit form
From a file — import profiles from a file with customer data
Via API — import profiles using API integration
Schedule — import profiles from the external SQL database on schedule
Altcraft Marketing also has integrations with external services:
- Tilda — integration with Tilda data collection forms.
- LPGenerator — integration with LPGenerator data collection forms.
- Yandex AppMetrica — integration with Yandex application metrics service.
Manual profile creation
Select the import method - "Manually".
The profile creation/editing form will open. During profile creation, you can add personal, contact, registration, and tracked data. This information is recorded in standard database fields.
Values for additional (custom) fields are specified in the "Additional fields" tab. Mandatory fields are marked with a red asterisk. You can create additional fields and set them as mandatory on the database editing page.
Below, on the "Subscriptions" tab, you can immediately assign a client to a specific resource when creating the profile.
Email and Phones fields on the Profile tab are not used for communications. You can store contacts in these fields and use them in subscriptions. Youcan also leave these fields empty and store customer information in subscriptions.
By default, the Email field is used for profile identification along with profile_id. You cannot create a profile manually without this field.
When saving a new profile, you can disable triggers and enable location by Reg IP (registration IP address)/IP (last known IP address):
Import from file
Uploading a file
You can use import from files to upload many profiles or update existing data. csv, txt, xls, xlsx, zip, tar.gz formats can be used.
Multiple table files can be uploaded into import from file form simultaneously. Press X next to file name to remove it. To add a new file, drag it to upload area or click on it and select file:
Check the "The first line contains the names of the column" box if the first line in your profile file is used to designate columns.
Select File Reading Mode. Two modes are available: Automatic and Manual.
The automatic mode uses UTF-8 encoding, if your file has a different encoding, you can go to manual reading mode and choose the one that suits you:
- Text qualifier — a character used to indicate the beginning and end of text data within a table cell. Qualifiers are required when the data within a cell contains characters that can be seen as delimiters or other special characters.
- Delimiter — a character that is used to separate data into separate fields (cells) in a table row. Delimiters are used to indicate the boundaries between columns in a table.
Profile identification
Select Import mode — it will depend on whether you add new records or update existing in the Altcraft profiles database:
- Add new leads and update existing ones
- Add new leads, do not update existing ones
- Update only
Profile matching mode defines what information from your file will be used in Altcraft for profiles search. This is necessary to update data without duplicating records. The following modes are available:
- By email, from profile or subscriptions — search by email from database or subscriptions.
- By email from profile — search by database profile email.
- By phone, from profile or subscriptions — search by phone in database field or SMS subscriptions.
- By custom field — search by custom database field, like customer ID in company CRM.
- By subscription — serach subscription data.
- By profile ID - by unique profile ID (only when updating data).
It is necessary to take into account the following peculiarities of matching:
- The value of the search field should be unique for each profile in the database, otherwise the platform will not be able to unambiguously identify the profile being searched for
- Only one search mode should be used for one profile database. This is to avoid creating duplicate profiles in the database.
- If you are going to use custom field matching, you should contact the platform administrator to create an index for this field. Thanks to the index, searching for a profile in the database will take much less time.
Fields customization
Pass profile contact information to Altcraft resources subscriptions (see the previous paragraph). You can store this data in database fields in order to search profiles. If customer identification is configured using CRM or other identifiers, email and phones may not be stored in appropriate fields.
You need to match columns in Altcraft database and columns in your file. Altcraft will detect the columns automatically if their names match the system ones, however, if your columns do not match the system ones, you can customize them manually by going to the "Unindentified" column:
- Source column — select data source from your file. The firstrecord will be displayed for each column for data type proper selection.
- Corresponds to a field in the database — select customer profile field to store data. You can select standard and custom fields.
After you select matches for the undefined columns, they will automatically be moved to the "Identified" column. If you have set an incorrect match, click on the cross to the right of the field you want, then it will be moved back to the "Unindentified" column.
The "Ignore empty in all columns" option is used when updating profile data that is already in the database. For example, the profile field "vendor" already contains the value "test.com", but now you are importing a file where the "vendor" field for this client is empty. The platform will overwrite the field with an empty value. To avoid this, enable the "Ignore empty in all columns" option for the corresponding column. In this case, the value in the "vendor" field will remain the same.
If your file has unknown client data written with values such as null
, nil
, none
or undefined
, the platform can also proccess these values as empty. To do this, you need to enable both the "Treat null value as empty" and "Ignore empty values" fields. In this case, the platform will not update the field.
Options
When configuring the import of data from a file, certain options are available for each field type that determine how the data will be processed and saved in the system:
Option | Description | Type of field |
---|---|---|
Ignore empty values | Prevents overwriting profile data with empty values during import, preserving existing information if the corresponding fields in the imported file are empty. | All |
Treat null values as empty | The platform will treat values of type null, nil, none or undefined as empty if this option is enabled. | All |
Automatic register correction | Converts letters to the selected register. For example: All letters are lowercase, Each word starts with an uppercase letter, or All letters are uppercase. | First name, Last name, Subscriptions(type of field - Line) |
Select the date format from the file | Allows you to select the date format that is represented in the imported file. | Date |
Default value | Preset value that is automatically filled in the field if there is no data for this field in the uploaded file. | Date |
Match the values of columns and fields | If the values in your column do not correspond to the system values of the platform, you can specify their correspondence. | Gender(type of field - List) |
Increase the field value by the value from the column | Adds a value from the imported file to an existing value in the specified database field, instead of replacing it. | Integer, Float |
Decrease the field value by the value from the column | Subtracts the value from the imported file from the existing value in the specified database field, instead of replacing it. | Integer, Float |
Round values to a specified number of decimal places | Automatically reduces a numeric value to a specified number of decimal places during data loading to ensure accuracy or format compliance. Rounding is applied to the data from the file, not to the total value that will be written to the profile field. | Float |
Tag delimiter | A character or set of characters used to separate multiple tags (labels) in a single file field so that the platform can properly recognize and import them as separate values. | Tags |
Add or update data by object field | An option that either creates a new value for the specified object field if it does not exist, or updates an existing value in the database based on data from the imported file. | Tags, Array of objects |
Delete data by object field | An option that removes objects with the same value in the specified field. | Array of objects |
Import to property | Writes a value from a file column to the specified property of the object. | Object |
Subscriptions configuration
When importing from a file, subscribe your clients to the necessary resources. A resource defines the possibility to send messages to profiles via different communication channels. Without subscribing to the resource, communication is impossible. In the Customize subscriptions block, click the + Add subscription button.
You have two modes of updating the status of your subscriptions: safe and unsafe. If you choose unsafe mode, subscriptions of profiles with the following statuses will be updated: Unsubscribed, Complainer, Hardbounced, Not valid. If a profile already has a subscription to the selected channel in the resource with one of these statuses, after import its status will be changed according to the specified settings.
For each subscription, select Resource, Communication channel, Subscription status and set the field matches.
Each profile is limited to no more than 20 subscriptions per resource.
For subscriptions to push notifications, additionally specify push service provider and push token:
Once a subscription is set up, you can edit it by clicking on it, or delete it by clicking on the red minus icon.
Final
In the final step of the import you can check your settings and run the import, as well as define additional actions with database fields.
In the Other actions with fields block, you can do additional actions on the profile database fields that have not been matched.
Furthermore, additional functions are included in the Extra options block:
-
Skip start triggers — disable on-import triggers and scenarios for this operation.
-
Detect geo-location by IP — When you submit data to the Reg IP or IP fields in IPv4 format, Altcraft will automatically detect geolocation and you will be able to select profile fields such as Coordinates, Country, City - or Country Reg. and City Reg. to fill in, and profile location on map widget will also be noted.
-
Create a static segment from the results of this import — when importing profiles static segment is automatically created.
-
Update a segment from the results of this import — when importing profiles, the segment is automatically updated.
Transferring status on import
When customizing fields and subscriptions, you can pass the profile global status and subscription status, respectively. The status in the file column can be specified in either text or numeric format.
Possible field values:
- 0, "subscribed" - available for communication via all communication channels
- 1, "unsubscribed" - unsubscribed from receiving messages on all channels
- 2, "complained" - complained about spam, communication stopped
- 3, "hardbounced" - ISP has completely refused to accept messages to this address
- 4, "unconfirmed" - subscriber registered but did not confirm consent to receive mailings
- 5, "suspended" - subscription is suspended for some time
- 6, "invalid" - excluded from marketing campaigns for any other reasons
Import via API
API is used for integration with external systems — sites, applications, customer data management (CRM) services, data collection forms. In the API request constructor you can set certain parameters for importing data and pass them to your developers.
In the "Matching field", select the data that will be used to search for existing profiles:
- Email - by profile field Email.
- Phone - by profile field Telephones.
- Profile ID - by unique profile ID (only when updating data).
- Custom field - by custom database field. For example, customer ID in a CRM company.
Also select resource to subscribe.
Check the Skip start triggers box if you do not want to run scenarios and trigger campaigns configured to import into the selected database.
Check the Skip invalid subscriptions box if you do not want to add a profile subscription if invalid data is present in the query.
Below you will see a template of the API request:
- Use API query to import or update a single profile.
- Other import API queries are described in the Profiles section.
- Managing profile subscriptions is described in the Subscriptions section.
Scheduled Import from External SQL Databases
Altcraft can automatically collect data to import new customers profiles and update existing profiles from ClickHouse, MySQL, MS SQL, PostgreSQL and Oracle RDBMS.
Instructions for configuring scheduled import are in a separate article.