> For the complete documentation index, see [llms.txt](https://docs.fact-finder.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fact-finder.com/webcomponents-overview/web-components-4.x./api/basic-elements/communication.md).

# Communication

Configure Web Components communication with FactFinder.

## Documentation

Add `ff-communication` to every page that uses FactFinder Web Components. Configure the server endpoint and channel.

```html
<ff-communication
  url="https://web-components.fact-finder.de/FACT-Finder"
  version="ng"
  api="v5"
  channel="bergfreunde-co-uk"
  default-query="backpack"
  search-immediate
></ff-communication>
```

`url`, `version`, and `channel` are required. FactFinder NG also requires `api`.

Define these attributes first, in this order: `url`, `version`, `api`, then `channel`. Browser attribute processing differs.

`default-query` sets the query used on page load. `search-immediate` starts that query after initialization.

### **Wait for initialization**

`ffCommunicationReady` fires when communication configuration has propagated. Subscribe before loading the Web Components bundle.

```javascript
document.addEventListener("ffCommunicationReady", (event) => {
  const factfinder = event.factfinder;
  const searchImmediate = event.searchImmediate;

  // Call this only when you want to trigger the configured default search.
  // searchImmediate();
});
```

The event guarantees initialized core, polyfills, configuration, and ready data receivers.

## API code

### Properties

<details>

<summary>Properties</summary>

| Name                                                                                                                                                                          | Description                                                                   |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| **url** (String, required)                                                                                                                                                    | FactFinder URL, including the context name. Define this first.                |
| **version** (String, required)                                                                                                                                                | FactFinder major and minor version. Define this second.                       |
| **api** (String)                                                                                                                                                              | NG REST API version. Required for `version="ng"`.                             |
| **channel** (String, required)                                                                                                                                                | Channel configured in the FactFinder backend.                                 |
| **search-immediate** (Boolean)                                                                                                                                                | Starts a search when components load.                                         |
| **use-url-parameters** (String, default `"true"`)                                                                                                                             | Controls whether FactFinder parameters are added to the URL.                  |
| **default-query** (String, default `*`)                                                                                                                                       | Query used when a search has no query.                                        |
| **only-search-params** (Boolean)                                                                                                                                              | Adds only search-related parameters to the URL.                               |
| **parameter-whitelist** (String)                                                                                                                                              | Comma-separated URL parameters to retain.                                     |
| **category-page** (String)                                                                                                                                                    | URL-encoded, non-removable category filter for NG.                            |
| **add-params** / **add-tracking-params** (String)                                                                                                                             | URL-encoded parameters for search or tracking requests.                       |
| **keep-filters** (Boolean)                                                                                                                                                    | Retains filters set before a search.                                          |
| **keep-url-params** (String)                                                                                                                                                  | Comma-separated URL parameters to include in requests.                        |
| **use-asn** / **use-campaigns** (String, default `"true"`)                                                                                                                    | Includes ASN data or campaign results.                                        |
| **use-found-words** (String, default `"false"`)                                                                                                                               | Returns words that produced result matches.                                   |
| **disable-cache** (String, default `"false"`)                                                                                                                                 | Ignores search result caches.                                                 |
| **use-personalization**, **use-semantic-enhancer**, **use-aso** (String, default `"true"`)                                                                                    | Enables request personalization, semantic enrichment, or search optimization. |
| **use-browser-history** (String, default `"true"`)                                                                                                                            | Adds searches to browser history.                                             |
| **user-id**, **purchaser-id**, **market-id**, **sid** (String)                                                                                                                | Identifiers used in supported FactFinder requests.                            |
| **use-seo** / **seo-prefix**                                                                                                                                                  | Enables the SEO API and configures its path prefix.                           |
| **search-url**, **suggest-url**, **recommendation-url**, **tag-cloud-url**, **tracking-url**, **campaign-url**, **compare-url**, **similar-records-url**, **get-records-url** | Custom service endpoints.                                                     |
| **ignore-page** (String, default `"false"`)                                                                                                                                   | Omits the page parameter from pagination requests.                            |
| **currency-code**, **currency-country-code**, **currency-fields**, **currency-min-digits**, **currency-max-digits**, **add-unit-to-filter-elements**                          | Currency display configuration.                                               |
| **sort-url-parameters-alphabetically** (String, default `"false"`)                                                                                                            | Sorts URL parameters and values alphabetically.                               |
| **use-filter-url** / **filter-url-prefix**                                                                                                                                    | Adds `categoryPath` to the URL path.                                          |
| **mustache-delimiters** (String)                                                                                                                                              | Comma-separated Mustache template delimiters.                                 |

</details>

### Events

<details>

<summary>Events</summary>

| Name                     | Description                                                      |
| ------------------------ | ---------------------------------------------------------------- |
| **ffCommunicationReady** | Fires on `document` when `ff-communication` connects to the DOM. |

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fact-finder.com/webcomponents-overview/web-components-4.x./api/basic-elements/communication.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
