{% extends "base.html" %} {% block title %}Bulk Customer Import{% endblock %} {% block content %}

Bulk Customer Import

Create multiple customer accounts and assignments from a CSV file.

Download Template Back to Customers
{# ── Format guide ── #}
CSV Format
Required columns
  • username — unique login name
  • email — unique email address
  • password — min 8 characters
Optional columns
  • project_name — exact contract name
  • facility_name — exact facility name within contract (leave blank for all)
Tips
  • Repeat a username on multiple rows to assign them to multiple contracts
  • Leave facility_name blank to grant access to all facilities in the contract
  • Existing usernames/emails will be flagged as errors before anything is saved
{# ── Upload form ── #} {% if not preview_rows %}
Upload CSV File
Maximum recommended file size: 500 KB · UTF-8 encoding.
{% else %} {# ── Preview results ── #}
Preview — {{ preview_rows|length }} row(s) parsed {{ valid_count }} valid {% set err_count = preview_rows|length - valid_count %} {% if err_count > 0 %} {{ err_count }} error(s) {% endif %}
{% for row in preview_rows %} {% endfor %}
Row Username Email Contract Facility Scope Status
{{ row.row }} {{ row.username or '—' }} {{ row.email or '—' }} {{ row.project }} {{ row.facility }} {% if row.status == 'ok' %} Ready {% else %} Error
    {% for e in row.errors %}
  • {{ e }}
  • {% endfor %}
{% endif %}
{# ── Action buttons ── #} {% if has_errors %}
Errors found. Fix the issues above and re-upload. Error rows will be skipped — only valid rows can be imported. {% if valid_count > 0 %} You may still import the {{ valid_count }} valid row(s) by clicking below. {% endif %}
{% endif %}
{% if valid_count > 0 %}
{% endif %} Upload Different File
{% endif %} {% endblock %}