Loymax SmartCom
English
English
  • What is Loymax SmartCom?
  • Main
    • Main feature
    • Main terms
    • How to start work
    • Communication types and channels
    • FAQ
  • Features
    • Segmentation
      • Segment builder
      • List of segments
      • RFM segments
      • Tags
    • Mass mailings
      • Mailing list
      • E-mail mailings
      • SMS mailings
      • Push mailings
      • Mailing settings
      • A/B testing in a mailing
      • Mailing report
      • Mailing calendar
    • Campaigns
      • Creating a campaign
      • Campaigns list
      • Triggers
        • Added a product to the container
        • Anniversary
        • Bonuses expected expiration
        • Customer registration
        • Date has come
        • Date come for client
        • Date come for order
        • Days since last visit to the site
        • Days since last order
        • Days since registration
        • Event occurred
        • Item from specific category purchased
        • Lost cart on the site
        • Lost view of product on the site
        • Customer visited section of website
        • Customer visited website
        • Customer viewed product on website
        • Customer viewed product category
        • Item purchased
        • Order is paid
        • Order is cancelled
        • Repeated date
        • Getting into RFM segment
        • Getting into segment
        • System event
        • Order was made/receipt was issued
      • Actions
        • Actualize filter
        • Select customers from segment
        • Run A/B test
        • Assign call
        • Accrue points
        • Accrue bonuses in the loyalty program
        • Limit number of participants
        • Limit poll
        • Send push
        • Send SMS
        • Send e-mail
        • Filter customers
        • Wait X minutes/hours/days
        • Wait until date
        • Check e-mail status
        • Report manager
        • Set tag
      • Campaign report
      • Abandoned cart
    • Control group
    • Campaign recipes
    • Polls
    • Customer profile
    • Personalization
      • Template engine
    • Analytics
      • Dashboard
    • Templates
    • Subscriptions management
    • Receipt attribution
    • Promo codes
    • Settings
      • General settings
      • Fields
      • Directories
      • Observers
      • Users
        • Access rights
      • Regions
      • Constants for templates
      • Mailing categories
      • Managing views
  • Usage
    • Quality of contact information
    • Metrics
    • Regions
    • Cascades
    • Events
    • Recommendations for quality mailings
      • Postmasters
      • DNS configuring
      • Warming up IP address
      • Avatar for mail
  • integration
    • Complete integrations
    • Data exchange
      • Introduction
      • Data structure
      • File exchange
      • SQL server data
      • REST API
      • Data exchange bus
    • JS tracker
Powered by GitBook
On this page
  1. integration
  2. Data exchange

SQL server data

PreviousFile exchangeNextREST API

Last updated 1 year ago

Several times a day, from the customer's SQL-server is launched.

The following SQL servers are supported:

  • MySQL;

  • PostgreSQL;

  • MS SQL Server;

  • Oracle.

There may be the following tables/representations on the server:

  • ;

  • ;

  • ;

  • ;

  • (nomenclature directory);

  • (product classifier);

  • (if they are not transmitted inside the Customer entity);

  • .

The tables must contain a field that the Platform can use to determine which data has changed/added since the last data exchange session.

There are two options of data batching:

  • By date (serial or timestamp);

  • By identifier.

With batching by date the Platform stores the maximum date value in the specified column and during next connection it queries all records with a date more recent than the specified one.

When batching by identifier, the Platform stores the maximum numeric identifier value in the specified column and during the next connection it queries all records with identifier greater than the specified one.

The data is queried in packs of specified size, for example, 1000 or 10000 records each.

When importing data with batching by date, the number of records with the same batching attribute value should not exceed 20000.

Configuration is supported when several users' data are stored in the same tables in the same database. In this case, the tables must contain a column with the user identifier. When importing data, the selection is made by this column.

Example of a real query executed by the platform on a remote SQL server:

SELECT 
    customer_id as local_id, 
    CONCAT(f_name, " ", m_name, " ", l_name) as full_name, 
    f_name as first_name, 
    m_name as middle_name, 
    l_name as last_name, 
    email as email, 
    phone as phone, 
    gender as sex, 
    b_date as birth_date, 
    country as country, 
    area as area, 
    city as city, 
    post_index as zip, 
    reg_date as register_date
FROM customers 
WHERE customer_id > {$last_id} AND user_id = 'acme-corp' 
LIMIT 10000;

In this example:

  • customers are extracted from the customers table;

  • the customer_id field is used for batching;

  • several users live in the same database, the user selection is done by the user_id field;

  • The size of the batch is 10,000.

data import
Customers
Receipts
Receipts lines
Events
Products
Product categories
Bonus balances
Promo codes