Once you have created your data parser, you need to add code to integrate the external webhook's payload into Transposit.
The Developer Platform provides a number of tools to help you.
While you are developing your parser, the Monitor helps you by showing you the payload returned from the webhook that you've set up while creating your parser. As you can see below, whenever you invoke the parser via your webhook, the Monitor shows you the results in the Results tab.
Use the Debug tab in the Monitor for more detailed information. To be able to view the payload in the Debug tab, check Debug logs in the Settings tab, as shown below.
When you activate the parser from an actual external webhook technology, while the Debug logs checkbox has been checked, you will be able to see the full payload, including the body returned from the webhook. In the below, a payload from Buddy Works, a CI/CD automation technology, is shown.
When you have used the Monitor to see the payload returned from the webhook, you're ready to use the Code Editor to parse the payload and present it in Transposit.
Below is the code that is a standard part of the Universal data parser, which is the typical starting point of a new data parser, as described in creating your first data parser.
It can be useful to have two browsers open simultaneously, one showing the raw parsed payload in the Monitor of the Developer Platform, while you add code to the data parser in the Code Editor in a different browser, as shown below.
Adding code to the data parser means identifying the fields from the payload that are relevant for the notification that the webhook should deliver to Transposit.
For example, looking at the payload in the Monitor, you might want to display the project name of the parsed body in the webhook's notifications:
In the above case, the code you would add could be two lines, as follows, see line 11 and 13, which parses the body and sends it as an initial response when the parser is triggered by the webhook:
For further details and syntax, see Data Parser Concepts & Best Practices.
Now, when an alert is received from the webhook, it will be displayed in Transposit as follows:
Note: On the page where you created the webhook, you can rename it so that "Universal data parser" is changed to the name of your choosing.
Whenever the notification indicates that there is an error in your code, go back to the Monitor and evaluate the problems that may have been encountered, as shown below.
You have now worked through the initial first steps of using the Developer Platform iteratively to add code to your data parser, invoke it via your webhook, and debug using the Monitor.