/

Invitation Code Content Access - Creating Codes - From CSV File


Creating Code From a CSV File

Back to User Guide

Creating Codes

Overview | Single Code | Multiple Codes | From CSV File

Head to Admin Dashboard → Invitation Code Content Access → Invitation codes to create codes.

In this screen you can manage your current codes and add new ones.

Click Import Codes From CSV.

Add Invitation Code (From CSV File)

This method generates multiple invitation codes at once based on a CSV file.

You can set:

  • Session - Write down the session name (for internal use only)
  • Note - Add a note (can only be seen by the admin)
  • Expiration date - Leave empty to never expire (respects the website time zone)
  • No of usages - Set a usage limit (empty or 0 means unlimited)
  • Sharing Type - Choose between a code type. Learn more.
    • Content (URL) - Set the allowed URLs (use * to indicate any subdirectory. For instance, example.com/*)
    • File - Choose file to be locked.
  • Disclaimer text - Apply an unique Terms of Service text. If you leave the field empty, the default ToS will be applied (learn more: Settings - General (Configuring Access, Privacy).

What is a CSV File

A .csv (comma separated values) file is a format that can be opened by most spreadsheet software. Sample table:

CSV File Specifications

Sample File

Save time by downloading our sample file and adapting it to your needs

The CSV file must follow some specifications:

  • Has to be UTF-8 encoded
  • Has to include the columns 
    • code
    • note
    • expiration_date
    • expiration_time
    • number_of_usages
    • allow_url
  • Has to include the code value for each code to be generated
  • If a field contains commas, it has to be enclosed by quotes. This ensures the fields don't get mixed. For instance:
    • Incorrect - Admin note, viewable only to the admin
    • Proper - "Admin note, viewable only to the admin"

Overriding Values

In the plugin screen, you can:

  • Select an internal name for the sequence (only shown to the admin)
  • Add a note (can only be seen by the admin)
  • Set the expiration date
  • Set a usage limit
  • Set the allowed URLs

These values will be applied only to fields that are empty in the CSV file. If a row has any assigned value to it, the value in the CSV file will be applied.

Example

The following CSV file will generate three codes:

  • cmicca-sample-1 - All fields will be imported from the CSV file 
  • cmicca-sample-2 - Expiration date and time will come from the plugin settings because they are empty
  • cmicca-sample-3 - All fields will come from the plugin settings because they are empty

Get more information about the Invitation Code Content Access plugin for WordPress

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center