Skip to main content

Overview

The SHOPPER-ADDRESS_V3 import allows you to import, update, and manage shopper addresses. The import supports multiple addresses per shopper, setting default addresses, and soft-deleting addresses that are no longer active.

Key Features

  • Multiple addresses per shopper: Each shopper can have multiple addresses identified by unique address_ref values
  • Update existing addresses: Addresses with matching address_ref will be updated rather than duplicated
  • Soft delete: Use the active column to mark addresses as deleted without removing them from the database
  • Undelete: Setting active=TRUE on a previously deleted address will restore it
  • Default address: Mark one address as default per shopper using the is_default flag
  • Grouped by shopper: All rows are grouped by shopper_ref before processing

Column Specifications

Import Behavior

Shopper Reference Validation

  • If a shopper_ref does not match an existing shopper, a warning is added to the row but the import continues
  • No addresses will be imported for non-existent shoppers

Address Creation and Updates

  • Addresses are matched by shopper_ref + address_ref combination
  • If an address with the same address_ref exists for the shopper, it will be updated
  • If no matching address exists, a new one will be created
  • This prevents duplicate addresses for the same address_ref

Soft Delete and Undelete

  • Setting active=FALSE marks the address as deleted (is_deleted=TRUE in database)
  • Setting active=TRUE on a previously deleted address restores it (is_deleted=FALSE)
  • If active is not provided, the address defaults to active

Default Address

  • Set is_default=TRUE to mark an address as the default for a shopper
  • Only one address per shopper should be marked as default
  • If is_default is not provided, it defaults to FALSE

Example CSV

This example demonstrates:
  • Multiple addresses for SHOPPER001 (HOME_ADDR, WORK_ADDR, OLD_ADDR)
  • A default address (HOME_ADDR with is_default=true)
  • A soft-deleted address (OLD_ADDR with active=false)
  • A work address with company name
  • An address for a different shopper (SHOPPER002)
Important: Once you import a SHOPPER-ADDRESS file, BSPK will no longer use the address fields from the SHOPPERS file. From that point on, the SHOPPER-ADDRESS file becomes the sole source of truth for managing shopper addresses.