Supported Property types, Formatting and Naming convention for Brightback.js
Implementing Brightback.js into your app is relatively straightforward with a few key considerations to keep in mind in regards to passing data to Brightback.
Making a precancel request to the Brightback server requires the addition of one or two properties along with your Brightback app_id depending on your configuration.
The Experience and Audience manager supports the following property types
strings integers or decimal numbers boolean dates as numeric strings or literals
Allowed date formats:
datetime = time | date-opt-time time = 'T' time-element [offset] date-opt-time = date-element ['T' [time-element] [offset]] date-element = std-date-element | ord-date-element | week-date-element std-date-element = yyyy ['-' MM ['-' dd]] ord-date-element = yyyy ['-' DDD] week-date-element = xxxx '-W' ww ['-' e] time-element = HH [minute-element] | [fraction] minute-element = ':' mm [second-element] | [fraction] second-element = ':' ss [fraction] fraction = ('.' | ',') digit+ offset = 'Z' | (('+' | '-') HH [':' mm [':' ss [('.' | ',') SSS]]])
Example snippet with various property types:
window.Brightback.handleDataPromise({ app_id: '123456', // String (example) email: 'jane@brightback.com', // String (example) account: { internal_id: '123abc', // String (example) value: 49.99, // Decimal (example) created_at: '2020-02-22T06:55:59.000Z' // Timestamp (example) }, custom: { // Use to add additional parameters additional_fields: { // Nested fields are okay, anything_else: ' ' // Arrays are not supported }, offer_url: 'https://example.com/pause', // String offer_eligible: true // Boolean (example) } });
To find out how your account Admin can utilize variables by mapping fields check out our help document here.