Example
Let’s take an example of a marketplace use case, where we want to show treatment on the item listing page. One critical contextual attribute for this use case is the information about the item that the user is currently looking at, like the product category. To deliver better treatments in real-time, we suggest customers pass back this detail in the request.| Field | Type | Description | |
|---|---|---|---|
| key | string | Identifier for the user attribute | |
| oneof | stringValue | string | Value in string type. |
| integerValue | int64 | Value in integer type. | |
| doubleValue | double | Value in double type. | |
| booleanValue | bool | Value in boolean type. | |
| boolValue | bool | Value in boolean type. | |
| timestampValue | string | Format of the timestamp should be as per ISO format. https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/timestamp.proto#L108 For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017. | |
| timestampMicrosValue | int64 | Timestamp value in epoch micros. |
Sending contextual attributes from the Web SDK
For Console-managed surfaces, set them once withsetContextualAttributes(); for your own calls, pass them on each getTreatments() / fetchAndRenderTreatments() call. Auxia uses a key only if it is registered as a data field, and drops an unregistered one without an error.