PostgreSQL

Integration

PostgreSQL integration allows you to import customer data, events, catalogs, and vouchers directly from your PostgreSQL database into Bloomreach Engagement. You can schedule regular imports for ongoing data synchronization or run one-time imports for historical data migration.

Benefits

  • Automation: Schedule regular imports to eliminate manual file exports and uploads
  • Accuracy: Direct database connections minimize manual errors and keep data synchronized
  • Flexibility: Use standard SQL syntax to import precisely the data you need
  • Security: Store credentials securely and control access at the database level

PostgreSQL integration use cases

  • Import customer profiles for personalization and segmentation
  • Sync product catalogs for accurate recommendations
  • Pull transaction events to build customer journeys
  • Import voucher codes for targeted campaigns

How the integration works

  1. Set up database connection: Configure connection details in Bloomreach Engagement.
  2. Choose data selection method: Write custom SQL queries or select entire tables.
  3. Map columns: Map database columns to Bloomreach Engagement attributes.
  4. Schedule imports: Run one-time imports or set recurring schedules.

Set up integration

  1. Go to Data & Assets > Integrations and click + Add new integration in the top right corner.
  2. In the Available integrations dialog, enter PostgreSQL in the search box, and select + Add new integration.
  1. Enter connection details (hostname, port, database name, credentials).
  1. Optional security configuration:
    • Static IPs: Enable static IP usage, then configure your PostgreSQL server firewall to allow connections from Bloomreach's IP addresses.
    • SSL encryption: Enable to encrypt data during transfer between your database and Bloomreach Engagement.
    • SSH tunnel: Enable for an additional security layer when connecting through intermediate servers.
    • MD5 password authentication: If you encounter authentication issues, create a dedicated database user with MD5 password storage for reliable connections:
      •  -- Connect as an admin
          SET password_encryption = 'md5';
          CREATE ROLE br_integration LOGIN;
          ALTER ROLE br_integration PASSWORD 'a-strong-random-password';
          -- Password will be stored as MD5 for this user only
        
      • Security recommendations for the integration user:
        • Strong passwords: Use long, random passwords and rotate them regularly
        • Minimal privileges: Grant only read-only access to required schemas and tables
        • Network restrictions: Limit connections to Bloomreach static IPs or your SSH tunnel
        • TLS encryption: Keep SSL enabled in the integration settings
        • Low connection limits: Restrict concurrent connections, e.g. with ALTER ROLE br_integration CONNECTION LIMIT 3;
  2. Give your integration a name and Save integration for use during data imports.

Create data import

  1. Go to Data & Assets > Imports > + Create new
  2. Choose the type of data to import:
    • Customers (columns mapped to attributes)
    • Events (with customer IDs, timestamps, and event attributes)
    • Catalogs (general or product-specific)
    • Vouchers
  1. Select Database as your data source and pick your PostgreSQL connection from the SQL integration dropdown menu.
  2. Choose your data selection method:
  • Query mode: Write custom SELECT statements to pull specific data
  • Table mode: Select entire tables without custom query options
  1. For Query mode: Write your SQL SELECT statement

For Table mode: Select the table to import from in the Source Table dropdown.

  1. Select Test query or Preview data to verify your data source is working.
  2. Click Next to proceed to mapping.
  3. Map your PostgreSQL columns to Bloomreach Engagement attributes by dragging source columns to the corresponding target fields, then click Next.
  4. Configure your schedule execution and click Finish to start the import.

Learn more information on the Data import page.

Best practices

  • Always preview data before importing to ensure format correctness.
  • Map identifiers carefully to avoid duplicates or overwrites.
  • Use scheduling for ongoing syncs and manual runs for one-time imports.
  • Secure credentials and review permissions for all integrations.

Limitations

  • Schema changes in your database may disrupt active imports - manage changes cautiously.
  • Follow data structure and mapping best practices to prevent import issues.
  • Custom database integrations should align with Engagement's data requirements.

Additional sources