Steps
- Each company referenced in the CSV file must be created (or exist) before attempting to import the CSV file.
- If you intend to also attach files (example: pdf, jpg, etc.) to posts, the files must be in the respective company directories before initiating the CSV import. If you upload the files manually (example: via FTP), ensure that your file names do not contain any spaces, and contain only letters, numbers, hyphens, or underscores. See the Upload File Attachments to a Company Directory via SFTP post for more information about uploading files to a company directory.
- Prepare your CSV file with the necessary post data. Note: It is recommended that you create a test CSV file with only one row and verify your import before attempting to import multiple posts.
- When your CSV file is ready, navigate to the client file or client invoice post list (WordPress Admin -> Client Files or Client Invoices) depending on the kind of posts you are intending to import. Note: If you import a CSV file on the Client File post list page, Client File posts will be created. If you import a CSV file on the Client Invoice post list page, Client Invoice posts will be created.
- Click the Bulk Create button at the top, and select your CSV import file.
- Click the Import CSV button to initiate the import.
Example CSV File
Download an example CSV import file that contains the column headings along with example values (do not import this example without replacing the example data with data specific to your site).
Note: The dates in the due_date column contain an intentional space before the date. This was done to prevent Excel from automatically changing the date format. If you are having issues with Excel changing the due dates in your CSV file from something other than YYYY-MM-DD, you can add a space before the date to preserve the correct date format.
Prepare Import CSV
Prepare your CSV file with the the following column names and corresponding values. Please note that column headings must be exact, and some values can only contain specific values.
The title column should contain the name that you would like to set as the post title, and can contain any characters that WordPress accepts for the post title.
The company_id column should contain the post ID (number) of the company that should be assigned to the file or invoice post. The company post ID can be obtained by navigating to WordPress Admin -> Client Portal Pro -> Companies -> Company ID Column (for the respective Company)
The excluded_users column should contain a list of usernames (user login names) that should be added as excluded users for the given file or invoice. Separate multiple values with a semicolon (;), and please do not use commas. Usernames can be obtained by navigating to WordPress Admin -> Users -> Username column (for the respective user).
The excluded_roles column should contain a list of role names (example: “shop_manager”) that should be added as excluded roles for the given file or invoice. Separate multiple values with a semicolon (;), and please do not use commas. Role names can be obtained by inspecting the output of wp_roles()
The status column should contain the file or invoice status slug depending on which type of posts you are creating (Example invoice status slug: “paid”; Example: file status slug: “in-progress”. This field is optional, but it may be required in your operation or work flow.
The assigned_product_id column should contain the WooCommerce product ID (number) of the product to associate with the invoice, and is only relevant when importing invoice posts. This column is required if you are intending to associate a product with the invoice. The product ID can be obtained by navigating to WordPress Admin -> WooCommerce -> Products, then locate and hover over the respective product title, and the ID will be visible in the hover menu.
The assigned_product_qty column allows you to specify a product quantity. If no value is entered, the default value of “1” will be used.
The product_title_override column allows you to override the default product name. If no value is specified, the product name will be used.
The category_slugs column should contain a list of file or invoice category slugs depending on which type of posts you are importing. Separate multiple values with a semicolon (;), and please do not use commas. File and invoice category slugs can be obtained by navigating to WordPress Admin -> Users -> Client Files or Client Invoices -> File or Invoice Categories -> Slug column (for the respective category).
The tag_slugs column should contain a list of file or invoice tag slugs depending on which type of posts you are importing. Separate multiple values with a semicolon (;), and please do not use commas. File and invoice tag slugs can be obtained by navigating to WordPress Admin -> Users -> Client Files or Client Invoices -> File or Invoice Tags -> Slug column (for the respective tag).
The due_date column should contain a date in the YYYY-MM-DD format if you are choosing to add a due date to the post. Any other date format will not be accepted.
The attached_file_name column should contain the name of a file that already exists in the respective company’s upload directory, if you are choosing to attach a file to the post. Adding a file name here will not upload a new file. Further, the file name should be the name of the file only (Example: “test-invoice.pdf”), and not the file URL.
Also, please ensure that you have enabled uploads for the type of file that you are attempting to attach ( WordPress Admin -> Client Portal Pro -> General Settings -> Allowed Upload File Types);
The new_post_email_sent column can be optionally set to sent to prevent the new post notification email from being sent to the client.
The exclude_from_new_post_emails column can be optionally set to exclude to prevent the new post notification email from being sent to the client.
The exclude_from_reminder_emails column can be optionally set to exclude to prevent reminder notification emails from being sent to the client for this specific post.
The post_status column should be set to a WordPress post status. To create the post and publish it, set the status to publish. To create the post as a draft to be published later, set the status to draft.
The post_excerpt column can be set, and can include text and/or basic HTML. Important: The content should not include line returns. Any line returns contained within the content may cause errors in your import.
The post_content column can be set, and can include text and/or basic HTML. Important: The content should not include line returns. Any line returns contained within the content may cause errors in your import.