Question
Can I modify a built-in step or trigger provided by xMatters to run additional code?
Environment
All versions of xMatters
Answer
You cannot directly edit the code of an out-of-the-box (OOTB) Flow Designer step or trigger, but you can copy it and modify the copy with your own script and configuration.
To customize a built-in step or trigger:
In the Flow Designer palette, click the settings (gear) icon next to the step or trigger you want to configure.
Select Copy as Custom Step/Trigger to create a new custom step or trigger:
On the Settings tab, give the step/trigger a new, clear name. Then configure any inputs/outputs you need. For example, when working with JSON payloads, add one output for each value you want to parse from the incoming data.
Click the Script tab to modify the step/trigger's code. Use the script to map data from the incoming payload (such as JSON fields) to the outputs you defined.
Click Save. Custom steps and triggers appear in the Custom tab of the Flow Designer palette.
Drag your custom step or trigger onto the canvas. If you are replacing an existing OOTB trigger (for example, to parse custom JSON payloads), disconnect the original trigger and connect your custom trigger in its place.
If any downstream steps show red indicators, open those steps and update their references to use the outputs from your new custom step or trigger.
Notes:
You can also build a trigger from scratch instead of copying an OOTB one. The custom HTTP Request Trigger type is typically used when you need to parse JSON payloads into specific outputs for use in a Flow.
Comments
0 commentsArticle is closed for comments.