createView with lookup and variable

I would like to query a view using an input value. It works with a hardcoded value.
But when I use $$RootId, it returns nothing.

This is the view.

db.createView (
“v_pricing”,
“RootIdLookup”,
[
{"$match": {RootId : “$$RootId”}},
{"$lookup": {
“from”: “CustomerLookup”,
“localField”: “RootId”,
“foreignField”: “RootId”,
as: “products”}}
])

This returns nothing
db.v_pricing.find({“RootId”:5308134})