cancel
Showing results for 
Search instead for 
Did you mean: 

Getting data field from Action response using Decision Function in SBPA

edna101
Explorer
0 Kudos

Hello all, after many attempts over some days I decided to reach out and ask for your help.

Using the Action project I have been able to retrieve data from our user management API spec and the response is like in picture below.

However I am unable to retrieve all content of the response array email field.

I was able to retrieve only the first email abc@gmail.com using decision table, however, my aim is to retrieve all the email from the array as they are email from user management API and all these email needs to get a notification.

I attempted using decision append function, update, foreach loop function but all to no avail. I get no output.

What I want to achieve is getting all the email address from the response array [abc@gmail.com, xyz@gmail.com, 123@gmail.com] and send a notification to them.

I look forward to all the help i can get to this task i am faced with.

 

Thank you

View Entire Topic
Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello @edna101 , 

Yes you can build workflow in BAS to create the script task for your purpose ( as you have done ) and then add this as workflow in BPA process. If you see in the error message, it shows 422 which means that the script task is not correct. Please note: script task is a javascript based script and you must ensure that all functions that you use are based on JS. Run this script in some JS runtime and check once. 

Regards,
Archana