-
|
Hello, I have a signal for an order, with into the payload the number of items and their type like that : I would like to make a custom parameter to make the sum of dessert for all the order. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi, all payload keys are of type This is what your signal could look like: {
"type": "order.dessertSum",
"payload": {},
"floatValue": 2
}Then your (custom) query could look like this: {
"aggregations": [
{
"fieldName": "floatValue",
"name": "Sum",
"type": "doubleSum"
}
],
"filter": {
"dimension": "type",
"type": "selector",
"value": "order.dessertSum"
},
"granularity": "day",
"queryType": "timeseries"
} |
Beta Was this translation helpful? Give feedback.
Hi, all payload keys are of type
Stringso this won't work. My recommendation is to use separate signals per course and use thefloatValueparameter, which you can sum up.This is what your signal could look like:
{ "type": "order.dessertSum", "payload": {}, "floatValue": 2 }Then your (custom) query could look like this:
{ "aggregations": [ { "fieldName": "floatValue", "name": "Sum", "type": "doubleSum" } ], "filter": { "dimension": "type", "type": "selector", "value": "order.dessertSum" }, "granularity": "day", "queryType": "timeseries" }