CustomerMetafields
Returns a list of Customer Metafields.
Table Specific Information
Select
The add-in uses the BigCommerce API to process WHERE clause conditions built with the following columns and operators:
- Id supports the = comparison.
- CustomerId supports the = comparison. A value for CustomerId is required.
- Key supports the = comparison.
- Namespace supports the = comparison.
The rest of the filter is executed client-side within the add-in.
For example, the following queries are processed server-side:
SELECT * FROM CustomerMetafields
SELECT * FROM CustomerMetafields WHERE CustomerId = 77
SELECT * FROM CustomerMetafields WHERE CustomerId = 77 AND Id = 2
Insert
To insert a customer metafield, specify at least the following columns: CustomerId, Namespace, Key, Value, and PermissionSet.
INSERT INTO CustomerMetafields (CustomerId, Description, Namespace, Key, Value, PermissionSet) VALUES (77, 'test', 'Warehouse', 'location', '88', 'app_only')
Update
UPDATE CustomerMetafields SET Value = 'updatedtest' WHERE CustomerId = 77 AND Id = 3
Delete
DELETE FROM CustomerMetafields WHERE CustomerId = 77 AND Id = 3
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | Integer | True |
Unique ID of the Metafield. |
| CustomerId [KEY] | Integer | False |
The Id of the corresponding customer. |
| DateCreated | Datetime | True |
Date and time of the metafield's creation. |
| DateModified | Datetime | True |
Date and time when the metafield was last updated. |
| Description | String | False |
Description for the metafields. |
| Key | String | False |
The name of the field. |
| Value | String | False |
The value of the field. |
| Namespace | String | False |
Namespace for the metafield, for organizational purposes. |
| OwnerClientId | String | True |
ID of metafield's creator. |
| PermissionSet | String | False |
Determines the visibility and writeability of the field by other API consumers. The allowed values are app_only, read, write, read_and_sf_access, write_and_sf_access. |
| ResourceId | Integer | True |
The ID of the resource with which the metafield is associated. |
| ResourceType | String | True |
The type of resource with which the metafield is associated. The allowed values are brand, product, variant, category, cart, channel, location, order, customer. |