Great-West Life: Employee Benefits CSV Export

Custom WordPress export plugin for a national insurer's Tim Hortons franchise owner benefits platform - clean CSV output from complex HR enrollment data.

Overview

Insurance / Benefits Administration · WordPress Plugin Development

Great West Life administered a group benefits plan for Tim Hortons franchise owners and their employees across Canada. The enrollment platform was built on WordPress, with a custom data model that stored two distinct record types: employers (Tim Hortons franchise owners) and employees. Each employer record tracked the franchise store number, payroll schedule, PAD banking details, the plan administrator contact, and the language preference for bilingual communications. Each employee record tracked the payroll ID, date of birth, annual earnings, store assignment, and enrollment status. Together, these two post types formed the core HR dataset driving a national benefits administration program.

Working with Ethan Hinson at Blue Tent Marketing, I co-built a configurable WordPress export plugin that lets administrators select any registered custom post type, choose which fields to include (standard WordPress fields, custom meta fields in Types/CCTM format, or taxonomy terms), and export the full dataset as a named CSV file streamed directly to the browser. Column headers are mapped from raw field keys to human-readable labels - so a field stored as wpcf-payroll-id appears in the export as "Payroll ID", and a field stored as wpcf-annual-earnings appears as "Annual Earnings". No manual header editing required.

The plugin was designed to be genuinely reusable. The post type and field list are configured through the WP admin settings page - nothing is hardcoded. When Great West Life needed to export employer records with a different field set, or export employee records independently, those were configuration changes, not code changes. The same plugin handled both CPT exports without modification.

The CSV is streamed directly to the browser via php://output with correct Content-Disposition headers, so the download begins immediately without writing any intermediate file to the server. For a benefits administration platform where HR data exports may include thousands of employee records, avoiding temporary server-side file storage was both a performance and a security consideration.

The plugin was also submitted to WordPress.org under both contributors (ethanhinson and dejanmarkovic), making it available to the broader WordPress community as a reusable data export utility.

Client: Great West Life

Location: Canada

The Challenge & Solution

Benefits enrollment data locked inside WordPress with no export path

Great West Life's benefits enrollment platform stored all HR data inside WordPress with no export path. The platform tracked franchise owners and their employees across the Tim Hortons network, with structured data covering payroll schedules, banking details for Pre-Authorized Debit enrollment, plan administrator contacts, and employee earnings and enrollment status. For a national benefits program, that data needed to move: into payroll systems, into compliance reports, into HR workflows at Great West Life. WordPress had no mechanism to produce it.

Off-the-shelf CSV export plugins were not an option. Generic exporters output one field at a time without awareness of the custom field structure, produce raw database keys instead of readable headers, and cannot handle the field mix required - standard WP fields alongside custom meta fields stored in Types/CCTM format. An export that outputs wpcf-payroll-id as a column header instead of "Payroll ID" is not useful to an HR team processing the file in Excel.

Working with Ethan Hinson at Blue Tent Marketing, I designed the plugin around three requirements: it had to work with any custom post type without code changes, it had to produce human-readable column headers regardless of how the underlying field keys were named, and it had to be safe to run against large datasets without writing anything to the server filesystem.

The solution was a configurable export plugin with a WP admin settings page where administrators select the target post type, then choose which fields to include from three categories: standard WordPress fields (post title, date, status), custom meta fields in wpcf- format (the Types/CCTM naming convention used by the platform), and taxonomy terms. For each custom field, a switch statement maps the raw key to a human-readable label that appears as the CSV column header. The entire result set is then streamed directly to the browser via php://output - no temp files, no intermediate storage.

The plugin handled both the employer and employee exports for Great West Life without any code changes between them - just a configuration switch in the admin. It was subsequently submitted to WordPress.org as a reusable utility for any WordPress site needing configurable CPT data exports.

Technical Highlights

  • Post type agnostic - works with any registered CPT, configured entirely through the WP admin settings page with no code changes required
  • Three export modes - standard WordPress fields, custom meta fields (Types/CCTM wpcf- format), and taxonomy terms selectable per export
  • Human-readable column mapping - raw field keys (e.g. wpcf-payroll-id) mapped to clean CSV headers (e.g. "Payroll ID") via a configurable switch
  • Streamed browser download - CSV delivered via php://output with correct Content-Disposition headers, no temp files written to server
  • Co-developed with Blue Tent Marketing - plugin submitted to WordPress.org under both contributors (ethanhinson, dejanmarkovic)
Challenge & Solution
Dejan Markovic
Dejan Markovic WordPress Architect
Best experience I've had to date with someone from Codeable. Dejan and his team jumped on a critical project over a weekend and had it sussed and patched on a Sunday; by Monday evening a fix was fully implemented. The team exceeded my expectations and I will be using them for all of my development needs going forward.
Eric R. | CEO & Founder, carsandcoffeeevents.com