> ## Documentation Index
> Fetch the complete documentation index at: https://docs.watchdog.no/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect IFS Cloud to Watchdog

> Connect IFS Cloud to Watchdog and grant access to invoices and documents.

Connect IFS Cloud to retrieve supplier invoices and PDF or XML attachments in Watchdog. Watchdog does not change, approve, or pay invoices in IFS Cloud.

## Before you begin

Ask your IFS administrator to prepare API access. You will need:

* `Base URL`: the root address of your IFS Cloud environment
* `Client ID` and `Client Secret`
* optionally, a `Scope` other than the default `openid microprofile-jwt`

## Connect in Watchdog

1. Open **Integrations → IFS Cloud** and add a connection.
2. Enter the details from your administrator.
3. Select **Test Connection**, then save the connection.
4. Optionally select companies and suppliers under **Settings**.

Without a company filter, Watchdog retrieves invoices from all companies the API client can access.

## For the IFS administrator

Create a confidential IAM client with a service account enabled for `client_credentials`. Give the service account read access to these APIs, called projections in IFS:

| Projection                           | Required content                                                    |
| ------------------------------------ | ------------------------------------------------------------------- |
| `PostingProposalHandling`            | `Reference_Invoice` and `Reference_SupplierInfo`                    |
| `ReceiveEinvoiceAttachmentsHandling` | `ReceiveEinvoiceAttachSet` and the document content in `Attachment` |

Access must cover the address where each projection is available in your environment, either `main` or `int`. Watchdog discovers this address and the token endpoint automatically.

See the IFS documentation on [IAM clients](https://docs.ifs.com/techdocs/25r2/030_administration/010_security/040_iam_settings/035_iam_clients/) and [read access to projections](https://docs.ifs.com/techdocs/24r2/030_administration/010_security/020_permission_sets/004_permission_set_overview/010_projections/).

## If documents are missing

The test tries to retrieve a document from a sample of invoices. If invoices can be read but documents are missing, check access to the attachment projection.

Invoices without an available PDF or XML document are skipped. Once the document or access is available, run a manual synchronization for the invoice's period.
