Lex::Transformer

When trying to get two difference services connected, the largest and most common issue is that service A doesn’t send a response/request to service b that service b understands. This is not typically true for services designed to be linked so we are excluding those.

When you open up a incident inside PagerDuty, you might get an Incident Key, the assignee the the severity back in a hash. {”incident_key”:”fklj1111”, ”assignee”:”Esity”, ”severify”:”p1”}

How do we turn that blob into something slack can understand? Via a transformation. At their core, a transformation is just an ERB style syntax stored in the database.

{”message”:”New PagerDuty incident assigned to <%= assignee %> with a priority of <%= severity %>”,”from”:”PagerDuty”}

Once transformer runs, the payload will be

{”message”:”New PagerDuty incident assigned to Esity with a priority of p1”,”from”:”PagerDuty”}

We use the Tilt gem to make this happen so you can see more info on their GitHub page