Combine CustomFilter and Microsoft Time Window filter feature manager

77 Views Asked by At

I am using Azure Feature Manager and as part of CustomFilter we would like to use Microsoft.TimeWindow as well so here is my json will look-

So how should I write my custom filter so both the conditions get executed. My custom logic is executed because my custom filter I am adding Alias - CustomFeatureFilter so my custom logic is executed and it returns true but does the TimeWindowFilter can be invoked after or before by the framework or do i have to call manually. Trying to write a generic code so if the time window doesnt exists than also the custom filter should work. or how do i know that particular feature contains what filter criteria and based on that i can invoke.

Edit : I see using FeatureDefinition I can loop through and get it, but was thinking that if there is any other way.

{
    "id": "TestCustom",
    "description": "",
    "enabled": true,
    "conditions": {
        "client_filters": [
            {
                "name": "CustomFeatureFilter",
                "parameters": {
                    "ChannelTest": "retail,wholesale"
                }
            },
            {
                "name": "Microsoft.TimeWindow",
                "parameters": {
                    "Start": "02/27/2024",
                    "End": "04/28/2025"
                }
            }
        ]
    }
}
0

There are 0 best solutions below