# How to assign documents to a product when it is created

Create a business rule with a "product is created"-[trigger](https://docs.struct.com/reference/settings/data-governance/business-rules/business-rule-details/triggers/trigger-details).  Then set up [conditions](https://docs.struct.com/reference/settings/data-governance/business-rules/business-rule-details/conditions/condition-details) that will check what kind of documents that should be attached.\
\
In this example the [attribute](https://docs.struct.com/fundamental-concepts/workflows-and-automation) "Article" is checked.&#x20;

<figure><img src="https://2141378775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUonpFWM7AJ0xVVXV1tr%2Fuploads%2FQ9zdm1rDARTcrYfmZ6UD%2Fimage.png?alt=media&#x26;token=2e20dc16-fff2-4fd4-9913-b28ecfbad834" alt=""><figcaption><p>Business rule trigger</p></figcaption></figure>

If the [attribute](https://docs.struct.com/fundamental-concepts/workflows-and-automation) is a type we know needs a document attached we can update that document using the "Update attribute"-action.\
\
In this case the Documents [attribute](https://docs.struct.com/fundamental-concepts/workflows-and-automation) is updated.

<figure><img src="https://2141378775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUonpFWM7AJ0xVVXV1tr%2Fuploads%2FIezMW7hgkeAhnk672U5s%2Fimage.png?alt=media&#x26;token=6a23fa4f-6003-4046-9148-0eb7b7ce6ab1" alt=""><figcaption></figcaption></figure>

The "else"-case is left empty so if future products that does not fit into the other [conditions](https://docs.struct.com/reference/settings/data-governance/business-rules/business-rule-details/conditions/condition-details) are created they will not have documents attached to them.&#x20;
