Skip to main content

If your team has SLA agreements you can’t afford to miss, or you already page on-call teammates for urgent issues, you might want to consider automating this using Front Rules and Application Requests.

This post will guide you through how to add a Front Application Request to trigger a PagerDuty incident, and how to enable that from a Rule in Front.

 

1. Create a PagerDuty Service

The PagerDuty Service is required as the “entry point” for creating the incident. When creating the PagerDuty Service, select the Events API V2 integration;

Creating a PagerDuty Service

2. Create your Front Application Request

Head into Front > Settings > Developers, and create a new App. Give it a useful name like “PagerDuty”. 

Click into the Servers tab in your new App, and create a server. The PagerDuty events API is hosted at https://events.pagerduty.com, so we can add that as the Server Origin value. No auth is needed here - this is specified elsewhere.

Click Save.

 

3.  Add Application Request

Click into the Features tab > Connectors > Application Requests tab, then select Configure Application Request.

Application Request > (1) Set up basics

Give your Application Request a clear name and description

Application Request > (2) Create inputs

Add the data you want to pass from Front to PagerDuty. To keep things simple for this example, let’s add the Front Conversation ID, and the message subject.

Application Request > (3) Build Request

Start by setting the API endpoint details - we need to send a POST request (the HTTP Method), and set the URL path to /v2/enqueue with the events.pagerduty.com server we configured earlier.

Switch to the Body tab to define the JSON payload we will send to PagerDuty. Clicking back into your PagerDuty Service from step #1, you’ll see an example command which we can copy + paste as the base for the body of our request.

The PagerDuty Send an Alert Event API docs explain all options available to us when building this request, but we’ll keep this simple for brevity.  

  • payload.summary - let’s update this to be the message subject.
  • payload.source - let’s define that the event originated from Front
  • links - add a link to the triggering conversation right in Front.
  • routing_key - this is the Integration Key from your PagerDuty Service dashboard - it ensures “this” Service is triggered when used.

Make sure you run tests as you build this to verify the events being created in pagerDuty meet your needs.

Application Request > (4) Define Outputs

This step is safe to skip over; we don’t necessarily need to do anything with the acknowledgement returned from PagerDuty.

 

4. Use in a rule

Now we have created and saved our App Request, let’s add it to a rule. In this example, I have a VIP Support rule, where we should trigger the page if the subject contains “urgent”, and the customer is marked as a VIP by their Account Custom Fields.

We use some simple Dynamic Variables to extract the Conversation ID and Message Subject from the conversation.

The rule action here is Send App Request - you will be shown a list of your existing App Requests; just pick the one we built here today, fill in the information, and keep up those award-winning response times!

 

Be the first to reply!

Reply