This information can be used for future reference or for specific targeting purposes.
When importing a customer list, you can automatically populate these custom fields. First, create a custom field that corresponds to a special column in your customer list. As long as the data name of the custom field precisely matches the column header in your list, the relevant information will be imported and stored in Spoks. Additionally, when using webhook payloads, ensure that custom fields are nested under custom_fields and that the Data name key matches the intended field. The webhook signs the contact up, so use it only for new sign-ups. To update a custom field on existing contacts, use an import. For example, a Date of Birth (DOB) field should be formatted as follows: "custom_fields": { "dob": "YYYY-MM-DD" }. Phone numbers should use the phone key and be formatted in E.164 format (e.g., +15555555555). Tags should be sent as an array of strings, such as "tags": ["value1", "value2"]. Common issues include missing DOB or phone values due to incorrect nesting or key names, and improperly formatted tags. Ensure that all fields adhere to the specified schema to avoid these problems. For example, a correctly formatted payload might look like this: { "custom_fields": { "dob": "1991-12-06" }, "phone": "+15555555555", "tags": ["customer", "vip"] }.
Updating custom fields from another system
To set or change custom field values on existing contacts from your own system, use the Spoks Public API: PATCH /contacts/{contactId}/custom-fields. A value you send replaces the contact's current value, and sending null clears the field. You can update several fields in one request.
The contact webhook can also set custom fields, but only on fields that are still empty. It never overwrites a value the contact already has, so use the Public API whenever values change over time (for example codes, statuses, scores or dates).