Product/components used and version/fix level are you on:
webMethods Webhook Trigger
Detailed explanation of the problem:
Not really a problem, more a question regarding best practice. I have a webhook coming in with user data. One of my fields is the user’s last name. I would like to modify the json and change the last name to “[Not Provided]” if the user’s last name is blank. What would be the easiest way to do this?
Error messages / full error message screenshot / log fileL
Is your question related to the free trial, or to a production (customer) instance?
Have you installed all the latest fixes for the products and systems you are using?
unknownname is a project parameter I created to avoid hardcoding.
You don’t have to use a parameter but if you do, then you can change the label in the parameter instead of editing the transformer.
You can add transformers when configuring the action/step. Click the “Add New” button in the Transform section. Then select Node.js in the “Transform Data” field. You will see a small editor on the right side with some sample code. You can then put your own logic in here. In my example I just reference the json data that is available.
Of course the names and locations will be different for you.
Does this make sense?
Note: this is one way to do it. If I think of others I will let you know.
Thanks! This makes sense. This is what my first thought went to, but I wanted to double check and see if there were any predefined transformation modules available that do this.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.