Could you share your existing settings? We can use additionalScope to pass data to any query.
Here is a simplified example: