We have constructed the URLs for the product pages in such a way that the category name also comes in the URL. This works perfectly fine for most of the cases. However if a product is selected in more than 1 category e.g. if I have a product for which I select 2 categories - "A" and "B", then it's choosing the B as the category name in the URL

Is it possible for us to create a rule so that it always chooses the "A" category instead of the "B" category in the URL?

i.e force it to use a particular category

Thanks