Event subscriptions

Apart from letting you to perform read and write operations on your backend, Integration Connectors also let you subscribe to events that occur in your backend applications. For example, consider you want to get notified when a new Jira ticket is created. You can accomplish this by configuring the Jira Cloud connector for event subscriptions. By using the event subscriptions along with Application Integration, you can create useful integrations to address your business needs. For more information, see Use event subscriptions in your integrations

Enable event subscriptions in connections

A connection that you create can be used for any of the following purposes:

  • For performing connector operations (entities and actions) only
  • For event subscriptions only
  • For performing connector operations and event subscriptions

The option to enable event subscriptions and configure event related details are available to you during connection creation. However, if you already have an existing connection and want to re-purpose it for event subscription, you can do so by editing and re-configuring the connection.

The following connectors support event subscriptions:

Data enrichment in event notifications

You can configure a connection to append additional information in an event notification response. The additional information is specific to the entity for which you have configured the event. To get the additional information, you must enable Data enrichment in your connection.

For example, if you have subscribed for a ticket creation event in Zendesk, you will be notified when a ticket gets created. However, the event notification payload consists only the basic ticket details. Additional details such as ticket description, assignee, and status aren't present in the payload. To get these additional details of the ticket entity, you must enable data enrichment in a Zendesk connection. For more information, see Configure event subscription. The following samples show the response payload without and with data enrichment.

Payload without data enrichment

The following sample shows the Zendesk's create ticket event's response payload without data enrichment.

{
  "account_id": 12345,
  "integration_key": "my_integration_key",
  "subdomain": "my_zendesk_subdomain",
  "input": {
    "ticket_event": {
      "meta": {
        "version": "1.0",
....
....
        "position": 1,
          "total": 9
        }
      },
      "type": "Ticket Created",
      "ticket": {
        "id": 35436,
....
....
        "external_id": "TEST1234",
        "tags": [
          "enterprise"
        ],
        "via": {
          "channel": "web"
        }
      }
    }
  }

Payload with data enrichment

The following sample shows the Zendesk's create ticket event's response payload with data enrichment.

{
    "context-data": {
    "AllowChannelback": false,
    "Assignee": null,
    "AssigneeId": 1.6696812051473E13,
    "Brand": null,
    "BrandId": 1.6696812163985E13,
    "Cc": null,
    "CollaboratorIds": null,
    "Commenter": null,
    "HasAttachment": null,
    "CreatedAt": "2023-07-08 11:37:19.0",
    "CustomFields": null,
    "Description": "Test desc 2",
....
....
    "Status": "open",
    "Subject": "Test Zendesk Ticket Created -2 -DA",
    "Submitter": null,
    "SubmitterId": 1.6696812051473E13,
    "Tags": "tag-changed-after-cache,ticket-created",
....
....
    "ViaChannel": "web",
    "ViaFollowupSourceId": null,
    "ViaSource": "{\r\n  \"from\": null,\r\n  \"to\": null,\r\n  \"rel\": null\r\n}",
    "View_Id": null
  },
   "data":{
  "account_id": 12345,
  "integration_key": "my_integration_key",
  "subdomain": "my_zendesk_subdomain",
  "input": {
    "ticket_event": {
      "meta": {
        "version": "1.0",
....
....
        "position": 1,
          "total": 9
        }
      },
      "type": "Ticket Created",
      "ticket": {
        "id": 35436,
....
....
        "external_id": "TEST1234",
        "tags": [
          "enterprise"
        ],
        "via": {
          "channel": "web"
        }
      }
    }
  }
 }

Private connectivity for event subscription

For enhanced security, you can configure private connectivity between your backend application and your connection. In private connectivity, the event listener of your connection will not be made public directly. Instead, you must allow ingress network traffic to the event listener through a PSC service attachment that will be provided to you by Integration Connectors.

During connection creation, if you have selected Enable private connectivity for event subscription, Integration Connectors creates a PSC service attachment. You must expose the PSC service attachment to your backend application by using any approach that is sutiable to you. One possible approach is to use the PSC service attachment in a load balancer, and then configure the load balancer to accept events from your backend application. The connection then listens to your backend's events on the load balancer's address. The following high-level steps show how you can use a load balancer to configure private connectivity:

  1. Go to the connection details page of the newly created connection.
  2. Click Edit ingress endpoint. This shows the Event subscription settings pane.
  3. Copy the service attachment name as displayed in the PSC service attachment name field.
  4. Create a PSC network endpoint group pointing to the service attachment that you got in the previous step.
  5. Create an external load balancer with the PSC network endpoint group created in the previous step as the backend.
  6. Configure the load balancer to accept requests from your event provider's (backend application) IP address.

    The subsequent setps (7 to 11) are applicable only in connectors whose backend supports auto-registration of event subscription. For example, Zendesk, and Jira.

  7. Go to the connection details page of the newly created connection.
  8. Click Edit ingress endpoint. This shows the Event subscription settings pane.
  9. Enter the address of the load balancer in the Event listener ingress endpoint field.
  10. Click Done.
  11. Click Save to save the changes to the connection.

Use event subscriptions in your integrations

When you use event subscriptions along with your integrations, you can create integrations to solve your complex business problems. For example, you can start the execution of your entire integration based on a ServiceNow event. Application Integration provides the following triggers that listen to event notifications from your backend applications:

To configure the triggers, you must enable event subscription for your connections. You can either enable the event subscription in an existing connection, or in a new connection. For detailed steps on how to configure these Application Integration triggers, see the corresponding trigger documentation.

View active subscriptions

When you use an event subscription in your application integration, Integration Connectors creates an entry for the subscription in the corresponding connection. To view all the subscriptions for a connection, perform the following steps:

  1. Open the all Connections page for your Google Cloud project.

    Go to the Connections page

  2. Click the connection for which you want to view the subscriptions.

    This opens the Connection Details page.

  3. Click the Subscriptions tab.

    This displays all the subscriptions for the connection. A subscription listed on this page can be in any of the following states:

    • Creating - The subscription is being created by an integration.
    • Active - The subscription is valid and functioning.
    • Suspended - The connection is in a suspended state.
    • Error - The subscription creation is unsuccessful. For example, authentication failure during subscription creation.

Pricing for event subscription

The data (event payload) processed for event subscriptions in the preview triggers, isn't charged. However, you will be charged for event subscription data processed in a generally available triggers.