Hey there, I'm trying to send an add-to-cart event...
# support
o
Hey there, I'm trying to send an add-to-cart event from Rudderstack to Algolia. The problem is that the events are not being ingested by Algolia, and it's returning a 400 error with this message:
for click eventType either both positions and queryId should be present or none
. Both
positions
and
queryId
are present in the payload, so I don't understand what might be failing. (I've added some variants of those fields with different casing to try to see if that would work, but it didn't) Thanks in advance. This is what currently is being sent:
Copy code
"properties": {
        "index": "pp_prod_product",
        "value": 902,
        "cart_id": "677",
        "list_id": "ahri_detail",
        "queryID": "ahri_detail",
        "queryId": "ahri_detail",
        "currency": "USD",
        "products": [
            {
                "mpn": "PA4SAN41800N",
                "sku": "1604089118336689",
                "name": "Sentry PA4SAN Air Conditioner 14.0 SEER-1.5 Tons Single Stage R-410A",
                "brand": "Payne",
                "price": 902,
                "erp_id": "1604089118336689",
                "pim_id": "1604089118336689",
                "list_id": "ahri_detail",
                "category": "Outdoor Unit",
                "position": 1,
                "quantity": 1,
                "list_name": "AHRI Detail",
                "product_id": "1604089118336689",
                "location_id": 221,
                "bu_product_num": "PA4SAN41800N"
            }
        ],
        "eventName": "Product Added",
        "list_name": "AHRI Detail",
        "objectIDs": [
            "1604089118336689"
        ],
        "objectIds": [
            "1604089118336689"
        ],
        "positions": [
            1
        ],
        "userToken": "2"
    }
m
Hey There! đŸ‘‹ Your message has been received by the RudderStack team. We will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
h
your query id looks wrong as its not an algolia id
queryId must be a 32-character hexadecimal string, the one algolia gives you back on a search
m
Thanks @hundreds-lifeguard-65770
o
Thanks! I completely missed that