Custom Fields
Custom Fields refers to 'meta data' in WooCommerce and 'additional details' in Shopify.
Metorik processes all of your order, customer, product and subscription custom fields, so you can do a few things with it in Metorik, including:
- Segment by it (including by custom fields that are dates, eg. a shipping date, birthday, etc.).
- Export it.
- Report by it.
- Add Custom Fields to report tables
- View it on 'single' pages.
- Edit it on 'single' pages (and add new custom fields too) - only for WooCommerce.
- Use it as variables in Engage automations.
More info about WooCommerce and Custom Fields, in general, can be found here.
More info about Shopify and Additional Details, in general, can be found here.
Note: If a single order, customer, product, or subscription has more than 1000 custom fields, we will not store the custom fields for it. This is extremely rare but if you find custom fields not being stored for some data, this may be why. Please contact us to check and we'll see if we can increase the limit for you.
Segmenting
When on the orders, customers, products, or subscriptions page, click the filter select and then scroll down to the bottom to find all of your available custom fields.
You'll have a variety of ways to filter on the data. For example, you could add a filter for the Stripe Fee custom field:
Or you could filter by the custom field not being empty:
The same applies to customer, product and subscription custom field filtering.
Date Field
You may want to filter on a Custom Field that is being used to store a date (for example a delivery date). This is possible to filter on by checking the Date field checkbox which will then give you a different set of filter options related to date periods.
For this filter to work correctly you must have the dates stored in the proper date format: YYYY-MM-DD.
So for example 12th of June 2020 would be stored as: 2020-06-12.
Optionally you can add the time in the format: HH:MM:SS.
So for example 12th June 2020 at 2:32pm and 43 seconds would be: 2020-06-12 14:32:43.
The date/time should be stored in the database as UTC timezone.
WooCommerce example: If you wanted to store the current time in a custom field, the WordPress PHP code may look a bit like this:
$order_id = 420; update_post_meta( $order_id, 'shipping_date', current_time( 'Y-m-d H:i:s', 1 ) );<br>
Note: If the dates are not in this standard time format, the filtering system may not work.
Additionally, If you are going to use this field as a variable in an Engage automation, make sure the field has the word date in it. Metorik will automatically format this to a human-readable date in your emails if the word date exists in the name (2020-06-12 becomes 12 June, 2020).
Exporting Custom Fields
Custom Fields stored in Metorik can also be exported very easily. From any of the data tables, simply click the Export button, then turn on the option "Customize export columns" and you'll be able to add exactly the custom fields you want. Learn more about Exporting.
Report by it
In various reports like the orders report and customers report, you can report by custom fields to see how many orders or customers have each field's value.
For example, Metorik stores the number of pages each customer viewed before checking out as a custom field. On the orders report, you can select that field - _metorik_session_pages - and then see how many orders had 4 pages, how many had 6 pages, etc. This works automatically with every custom field - give it a try with your own data and see what you can find.
Add Custom Fields to your Report Tables
Using Metorik's new Custom Columns feature, you can now add your custom fields directly to the report tables.
Once your custom fields are set up in WooCommerce, you can add your distributor information to your product tables, or your sales rep and warehouse information on your Order tables, as shown below:
View / Edit / Add
When on a single order or customer page, you'll find a Custom Fields section where most of the custom fields can be seen.
WooCommerce: From there, you can add new custom fields and edit some existing ones (hidden ones that start with _ can't be edited).
Note: It's possible to see custom fields for subscriptions but not to edit or add new ones due to limitations in the WooCommerce Subscriptions API.
Favorite Custom Fields - Settings
WooCommerce: By default, Metorik will show your top 150 custom fields in 'custom field selects' (eg. for segmenting & exporting). If a custom field is not appearing when you are trying to segment/export data, head to the custom field settings, and add the custom field there:
Custom fields added here will be displayed at the top of 'custom field selects' for easy access.
Additionally, any custom fields added here will be considered 'favorites' and given display priority on single order, customer, and subscription pages.
Hidden Custom Fields
Some custom fields that Metorik considers protected or arbitrary are ignored. Most of the time, this won't matter but if you find that some custom fields you need is being ignored, please reach out to us and we can take a look.
Other Notes
Every few hours, Metorik will refresh for the possible fields, so if you don't see one you're looking for, it should show up soon or you can message us and we'll refresh it right away for you.
WooCommerce: If you're adding custom fields through code, be sure to change the order/subscription/customer 'last updated' dates, so Metorik knows about the change. More details in this help doc.