Configuring custom fields to store custom values alongside transaction data

When storage is enabled, the Carbon Engine allows you to configure arbitrary fields to store with your transaction data. For example, if you have a code that represents the vendor used in the transaction, you might want to add a vendor_id field. These additional fields can be provided when creating/updating a transaction, and the data is supplied back on all requests for transaction data.

To configure custom fields, include a query parameter on your COGO_STORAGE environment variable called custom_fields with a comma-delimited list of fields. For example:

s3:bucket-name?locking=dynamo&table=table-name&custom_fields=vendor_id,customer_notes

You can specify up to 16 custom field names. Each name must start with an alphabetic character or underscore, and the names can only contain alphanumeric characters and the underscore and must be less than 32 characters in length. To avoid confusion, custom fields cannot be named the same as other standard transaction fields.

Values put into custom fields must be either null or a string, and must be a maximum of 255 characters. If a custom field value is not specified when writing a transaction, it will take the value null.