> For the complete documentation index, see [llms.txt](https://docs.inogic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inogic.com/attach2dynamics/how-to-guides/configuring-hierarchy-structure.md).

# Configuring Hierarchy Structure

Attachments/Documents of Dynamics 365 CRM records can be stored in SharePoint sites on the basis of hierarchy. To achieve this, follow the steps given below:

* Go to **Advanced Settings --> Settings --> Document Management Settings.**

<figure><img src="/files/-M9Q7rxYtkAcEwZkrWGb" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

* Select **Entities --> Enter the URL of respective SharePoint site.**

<figure><img src="/files/-M9Q7xhmSoRqnwvsa34G" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

* Enable the Checkbox **‘Based on Entity’** **--> Select either of the entities, Account or Contact --> Click on Next.**

<figure><img src="/files/-M9Q8g-fOk4MNyk0ocuN" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

* Click on **Finish.**

<figure><img src="/files/-M9Q8w6GhfxAnFlwTvo-" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

* When hierarchy is enabled, the path structure will look as shown below.
* Next, go to **Opportunity --> Select an opportunity --> Click on Attach2Dynamics button --> Drag and Drop required file.**

<figure><img src="/files/-MVWI8MtNEyYl5-0Q8fL" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

* Next go to SharePoint site. Here, the respective file will be stored in the following manner: **Account > Account Name\_guid > Opportunity > Opportunity Name\_guid.**

<figure><img src="/files/-MVWIGPi1pqO4W-8vyvw" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

{% hint style="success" %}
For any queries, reach out to us at <crm@inogic.com>
{% endhint %}
