> [!WARNING]
>
> **Preview
> --- Third-party events in Eventarc**
>
>
> This feature is
>
> subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the
> [Service Specific
> Terms](https://docs.cloud.google.com/terms/service-terms#1).
>
> Pre-GA features are available "as is" and might have limited support.
>
> For more information, see the
> [launch stage descriptions](https://cloud.google.com/products/#product-launch-stages).

Eventarc allows events to be asynchronously delivered from
third-party SaaS sources (providers) to interested customers (subscribers).

Third-party providers are non-Google providers that offer an Eventarc
source. The provider can emit events directly
to Google Cloud which are then routed to your project.

As a subscriber, you only need to create a channel for the appropriate provider,
and then pass along the channel name and activation token to the provider.

The following diagram illustrates a data processing pipeline with a third-party
provider as a starting point:

<br />

![Event subscription flow](https://docs.cloud.google.com/static/eventarc/images/third-party-integration-diagram.svg)

<br />

Third-party events in Eventarc support the following:

- Events offered by a provider can be routed to any Eventarc destination. You can see the third parties that offer an Eventarc source by [listing providers](https://docs.cloud.google.com/eventarc/docs/list-providers.md.txt) or by [viewing the documentation](https://docs.cloud.google.com/eventarc/standard/docs/third-parties/third-party-entities.md.txt).
- Subscribers are able to filter events using any of the attributes written by the provider, and drive their application behavior based on those events without having to filter in the application itself.

For further details and key use cases, see the
[Eventarc overview](https://docs.cloud.google.com/eventarc/standard/docs/overview.md.txt).

## Subscribe to events from a third-party provider

You can subscribe to events from a third-party provider. See the
[providers currently offering an Eventarc source](https://docs.cloud.google.com/eventarc/standard/docs/third-parties/third-party-entities.md.txt).

You can also run a `gcloud` command to [list all Eventarc providers](https://docs.cloud.google.com/eventarc/docs/list-providers.md.txt)
and retrieve their details, including supported event types.

## Sign on as a provider

Are you interested in signing on as an Eventarc third-party
provider? For more information, see
[Offer an Eventarc source](https://docs.cloud.google.com/eventarc/standard/docs/third-parties/offer-source.md.txt)
and contact us at
[eventarc-integration@google.com](mailto: eventarc-integration@google.com.).

## Event subscription flow

When setting up as a subscriber to receive third-party events from an event
provider, the flow of interaction is as follows:

<br />

![Event subscription flow](https://docs.cloud.google.com/static/eventarc/images/third-party-event-flow.svg)

<br />

1. A subscriber creates a channel using either the Eventarc API or through the Google Cloud console.
2. Eventarc returns an activation token for the channel which binds the channel to a specific provider.
3. The subscriber conveys the channel name and activation token to the event provider. The activation token allows that provider to activate the channel. This ensures that only specific events are ingested into the channel.
4. The event provider activates the channel using the activation token. The activation token is valid for 24 hours, after which it expires and a new channel must be created to complete the configuration. Once the activation token is used, it cannot be used again and does not need to be retained.
5. The event provider can now publish events to the channel using the Eventarc Publishing API.

## Event subscription terms

Understanding the following terms will clarify the event subscription flow:

- An Eventarc event **provider** is a service or entity that can
  emit events directly to Google Cloud which are then routed to a project.
  They can include third-party non-Google entities that offer an
  Eventarc source.

- A **subscriber** subscribes to events from a chosen provider. The provider
  can send events to the subscriber's project and the subscriber can consume
  the events. For example, the events can invoke a destination Cloud Run
  service or a target Workflows workflow.

- The subscriber controls the **channel**, a Google Cloud resource through
  which the provider interacts with the subscriber's project. By creating and
  activating a channel, a subscriber makes an explicit request to receive
  events from a provider.

- An **activation token** is a string generated by Eventarc
  when a subscriber creates a channel. This token is used by the provider to
  create a resource in their project called a **ChannelConnection** which
  represents a persistent connection to a subscriber's channel. By creating
  this connection, a subscriber's channel becomes active and events can be
  published to the channel. A token is valid for 24 hours after the channel's
  creation. After 24 hours, the channel becomes INACTIVE.

- The subscriber creates an Eventarc **trigger** which is
  used to configure event routing by specifying filters for the trigger,
  including the event type, the destination, and a channel.

## Regionality

All third-party events in Eventarc are regional. This means
that every delivered third-party event is published to a channel connection,
routed through a channel, and matched to a trigger, all in the same
Google Cloud region.

However, the data regionality of third-party providers varies greatly, and
Eventarc does not make any assertions about the regionality of
event providers. The data location of a provider platform might not necessarily
match that of the channel resource.

### Provider location

Third-party providers are available only in supported Eventarc
[locations](https://docs.cloud.google.com/eventarc/docs/locations.md.txt).

Providers might further limit available locations due to specific regionality
requirements. See the provider-specific page for a list of supported regions in
which they publish events.

Note that for this Pre-GA feature, the following locations are supported:

- `asia-northeast1`
- `europe-west4`
- `us-central1`
- `us-west1`

You cannot create a channel in any other location.

## Pricing

Although there is no cost for this feature during its preview, it is a
chargeable feature. For more information, see
[Eventarc pricing](https://cloud.google.com/eventarc/pricing).

## What's next

- [Create an Eventarc trigger for third-party events](https://docs.cloud.google.com/eventarc/standard/docs/third-parties/create-trigger-thirdparty.md.txt)
- [Learn more about Eventarc](https://docs.cloud.google.com/eventarc/standard/docs/overview.md.txt)
- [Troubleshoot event publishing errors](https://docs.cloud.google.com/eventarc/standard/docs/third-parties/troubleshoot-providers.md.txt)