---
schema_version: "1"
id: 7a50407732e390143e4e367452d0c4ea0361dfa7cb9b885af0fc05a57c1fe697
title: Architecture
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi-dev-guide-lwc-in-db/guides/concept/bi-lwc-in-db-architecture.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-lwc-in-db/guide/bi-lwc-in-db-architecture.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a5016077f9857ab3e1bc7213943a707d8e4e42e1a3bb901d6d3e37d61a495386
products:
  - Lightning Web Components in CRM Analytics Dashboards
  - analytics
---

# Architecture

Let’s look at how custom Lightning Web Component widgets fit into the existing CRM Analytics dashboard architecture.

**note:** This architecture doesn't apply for custom Lightning web components added to Lightning dashboards.

CRM Analytics dashboards work with a clean separation of concerns. Widgets get data from queries, and pass selection back to them. Queries can pass selections to each other through faceting and receive global filters from the core runtime. Steps can also pass selections and data to other components via bindings.

![The CRM Analytics dashboard architecture.](https://developer.salesforce.com/media/bi_dev_guide_lwc_in_db/bi_lwc_in_db_arch1.png)

Now you have a way to put your code into the mix while taking advantage of this entire system.

![The CRM Analytics dashboard architecture with a custom LWC component.](https://developer.salesforce.com/media/bi_dev_guide_lwc_in_db/bi_lwc_in_db_arch2.png)

Mixing custom code in with widgets creates a powerful dynamic, and you have many ways to get state and configuration into your code. Meanwhile, you can communicate with the parent dashboard by setting selections on the associated query or using the `setState` method.

![How the LWC communicates with the CRM Analytics dashboard.](https://developer.salesforce.com/media/bi_dev_guide_lwc_in_db/bi_lwc_in_db_arch3.png)

**See Also**

- [Setup](https://developer.salesforce.com/docs/analytics/bi-dev-guide-lwc-in-db/guide/bi-lwc-in-db-setup.md)
