how to store element value in Global Variable from Web Service Response and need to pass in another Web Service Request or Header

I am configuring the Web Service in Katalon Studio. I have to take element value from Web Service Response and Store it in Global Variable and the same element has to be sent in Next Web Service Request or Header part. Whenever i hit this Web Service i will get Unique values the same value need to be updated in Global Variable and have to sent current value in Next Service.

OAUTH - In below example i need to store access_token 7 its value in Global Variable and need to use it across.

"access_token" :“eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NzQ2OTY0NzQsInVzZXJfbmFtZSI6ImJlYXN0dGVzdDQiLCJhdXRob3JpdGllcyI6WyJST0xFX0JFQVNUX0JPX0lUIiwiUk9MRV9CRUFTVF9DQVBfQURNSU4iLCJST0xFX0JFQVNUX1NVUEVSVVNFUiIsIlJPTEVfQkVBU1RfRlJBVURfVkVMT0NJVFlfQ0hFQ0siLCJST0xFX0JFQVNUX0JBQ0tfT0ZGSUNFIiwiUk9MRV9CRUFTVF9DQVBfTU9OSVRPUiIsIlJPTEVfQkVBU1RfRlJPTlRfT0ZGSUNFIl0sImp0aSI6ImU1YWVmNDk1LTAwN2YtNGM4NS04MmZiLWYzZjEzNjNlNTgzNiIsImNsaWVudF9pZCI6Ik9hdXRoLVRydXN0ZWQtQ2xpZW50Iiwic2NvcGUiOlsicmVhZCIsIndyaXRlIl19.hD3BXKJbo2sTkEhQAYxUi7CDU45-ZtZWjjpO99-21McrvK74Ffh0uIImFTE71JI0wjwUWZ1zM28rZ7pQfQB9TLOeUW1bImtFDMaHIg_NvfWXLNCQe8lREjCv-LhpSkKksUyBU85A-Q8T4az0VQyKGs0AfHvc2gTrEWuoJGQpDfePz3l_10fJnEqC5arev-vIF1zeMijHXUWQd-AGKr_PLn2S8iPOpkBAiNmz1SDTDBZe1jdpVfYSC1RJQAbzOWGpL0ia7TAzBPpEpn6XV3emoIWIpFTJY0CNavQvEL9fc-D8nPmwF4q_Tnm2LnqbtCIlqk2SbFU5bdSmtIZfl5atxA”,

Transaction Id : In below example i need to store transactionID and its value in Global Variable and need to use it across.

{ “transactionID”:“09610123112519543357” } Kindly help me to resolve this issue.

Hi @sgopinathrocks,
Can you be more specific about your use case? Do you aim to achieve this via defining test cases, or you want this configuration in the request object view?

Hi Huynguyen,
I need to do this in Test Case. I have 30+ Web Services in One Test case, i need to pass the Transaction Id in each 30+ Services which i will generate hitting Transaction id Service. In Response i will get Transaction Id and i need to store it in Global Variable and sent it next upcoming Services.

Hi @sgopinathrocks,
You can assign your transaction ID to your global variable as: GlobalVariable.transactionId = <your_transaction_id>. Remember to declare a global variable with the name transactionId in your execution profile.
To use this global variable in your other requests (such as in header), you need to parameterize that part of the request with a variable which will take value from your global variable.
Please see https://docs.katalon.com/katalon-studio/docs/parameterize-a-web-service-object.html#query-parameters for more details on how to parameterize a web service object.
Regares.

Thanks huynguyen…it worked