# Defending Margin
This secion covers setting up margin upper and lower bounds. This results in runtime validation on a cart where margin needs to be in a defined range.
The range is defined in a matrix at a product level.
Separate to the margin bounds you can define limits on adjustments using vistual context scope on AdjustmentData. This allows you limit the % adjustment (or total discount) on any transaction.
These two feature in conjunction offer fine grained control in order to ensure order capture does not result in bad deals.
Follow the steps here:
Set up a virtual context scope for AdjustmentData.
Navigate to CMT Administration > EPC Jobs and click Start on the Create Default Contextual Adjustment Data.
Navigate to Vlocity Product Console > Context Scope and click the ‘+’ icon. Create a Context Scope as follows:
https://help.salesforce.com/s/articleView?id=ind.comms_qualification_rules_for_pricing_adjustments___assigning_or_deleting_to_the_adjustmentdata_virtual_object.htm&type=5
https://help.salesforce.com/s/articleView?id=ind.comms_qualification_rules_for_pricing_adjustments__contextual_adjustments_.htm&type=5
https://help.salesforce.com/s/articleView?id=ind.comms_creating_context_mappings.htm&type=5