# How to create a pricing rule programmatically through plugin code for a product with multiple rule conditions of customer number, customer group and product quantity

**URL:** <https://forum.shopware.com/t/how-to-create-a-pricing-rule-programmatically-through-plugin-code-for-a-product-with-multiple-rule-conditions-of-customer-number-customer-group-and-product-quantity/94268>\
**Category:** Shopware 6 (English)\
**Created:** [6. Mai 2022 um 10:14 UTC](https://forum.shopware.com/t/how-to-create-a-pricing-rule-programmatically-through-plugin-code-for-a-product-with-multiple-rule-conditions-of-customer-number-customer-group-and-product-quantity/94268 "2022-05-06T10:14:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![akamal](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@akamal](https://forum.shopware.com/u/akamal)\
**Post date:** [6. Mai 2022 um 10:14 UTC](https://forum.shopware.com/t/how-to-create-a-pricing-rule-programmatically-through-plugin-code-for-a-product-with-multiple-rule-conditions-of-customer-number-customer-group-and-product-quantity/94268/1 "2022-05-06T10:14:24Z")

</div>

Hi,

I have to create a pricing rule for products through plugin code I mean programmatically with dynamic conditions created through plugin. So, in my process I first create the conditions with customer number and customer group together but dont know how to do this. So, after creating multiple conditions then to create a pricing rule. Please help me to create condition Rule and the pricing rule. You can suggest me the reference. Thanks.
