Aggregate pipeline lookup with pointer

Hi,
Iā€™m trying to create an aggregate pipeline query with a lookup to join 2 tables that takes as a localField a pointer and as a foreignField an object Is. However I canā€™t seem to be able to obtain a successful result. If I place string values as foreign and local fields everything works but I canā€™t figure out how to do the same with pointers and object ids.
Any suggestions?

I donā€™t have suggestions now. You could share some of the code that you have now.

Sure, here is the code I am currently testing:

const query = new Parse.Query("Sales");
  const pipeline = [
    {
      lookup: {
        from: "Product",
        localField: "product",
        foreignField: "objectId",
        as: "soldProduct",
      },
    },
  ];
  
  var res = await query.aggregate(pipeline, {useMasterKey: true});
  console.log(res);

The ā€œproductā€ localField is my pointer, while the ā€œobjectIdā€ foreignField is the objectId.
This code however does not seem to work.

try id here instead of objectId, or _id

Iā€™ve already tried all combinations but none of them work.

maybe this gets you closer: