> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/calendar/overlay-an-ics-calendar.md).

# Overlay an ICS Calendar

Display a facilities calendar from an ICS file alongside Salesforce Events so training coordinators can see maintenance blocks before booking.

A facilities team shares its maintenance schedule as an ICS file. Add the file to Avonni Calendar so the training coordinator can see maintenance blocks alongside Salesforce bookings. Calendar displays the imported entries as a separate source.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FAhahYYCJUbjuc2T3az4r%2Fcalendar-ics-overlay-result.png?alt=media" alt="Calendar Day view with the Facilities Maintenance import and Salesforce training events."><figcaption><p>Facilities Maintenance appears on the same day as the Salesforce bookings.</p></figcaption></figure>

## Before you start

* Start with a Calendar that displays Salesforce Events. Use the [resource timeline tutorial](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/calendar/build-a-resource-timeline.md) to create one.
* Use a test `.ics` file with a distinct event such as `Facilities Maintenance`. Note its date, start and end times, and time zone. Pick the same date as a test Salesforce booking so you can compare both sources in one view.
* Upload the file to Salesforce Files. Use the file's `ContentDocument` ID and confirm that the user testing the Calendar can access the file.

## Steps

{% stepper %}
{% step %}

### Add the file to Calendar

1. Select the Calendar in Component Builder and open **Properties**.
2. In **Content**, find **ICS Calendar links or Content Document IDs**.
3. Add an entry with the `ContentDocument` ID if the Calendar always uses the same file. To use a different file at runtime, open **Type of value** next to the setting and map a text collection containing the `ContentDocument` IDs. For one file, map a collection with a single ID.
4. Leave the existing Event query in place, then save the Dynamic Component.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FcTOGbCl7lvoM1DyXgpC4%2Fcalendar-ics-overlay-setting.png?alt=media" alt="Calendar Content settings with ICS Calendar links or Content Document IDs visible." width="640"><figcaption><p>Add the file under Content in Component Builder.</p></figcaption></figure>
{% endstep %}

{% step %}

### Check both event sources

1. Open the Salesforce page that uses the component. Navigate to the date in the file and clear any search or resource filters from the test.
2. Find `Facilities Maintenance` alongside the Salesforce booking. The example shows both sources in the **Calendar** display. Compare its times with the ICS file, accounting for the time zone the Calendar uses.
3. If you are using a Timeline with resource rows, look for the imported event on the **Empty** row. The file entry appears without a Salesforce resource assignment.
4. Remove the test entry from the setting, save, and reload the Salesforce page. Confirm that `Facilities Maintenance` disappears and that the original Salesforce booking remains. Restore the ICS entry and verify that it appears again.
   {% endstep %}
   {% endstepper %}

## Use an ICS URL

You can add a direct HTTP or HTTPS link that returns an ICS file in the same setting. Ask your Salesforce administrator to authorize the endpoint in **Remote Site Settings** before using the link. Use a calendar approved for the audience of the Salesforce page.

## Troubleshooting

<details>

<summary>The Salesforce events show, but the ICS entry is missing</summary>

Check the visible date and any active search or resource filters. For a Salesforce File, verify the file extension, the `ContentDocument` ID and the current user's access. For a URL, verify that Salesforce can reach the endpoint and that it returns calendar data. A source that fails to load is skipped.

</details>

## Related tutorials

* [Build a Resource Timeline from Salesforce Records](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/calendar/build-a-resource-timeline.md) shows how Salesforce Events map to resource rows.
* [Filter and Search Bookings](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/calendar/filter-and-search-bookings.md) shows how to find a Salesforce booking and clear the results afterward.


---

# 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.avonnicomponents.com/dynamic-components/tutorials/components/calendar/overlay-an-ics-calendar.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.
