for one of my use case I need to embed a web page into my script and I would need to retrieve info from that webpage to be able to use it as a variable into the script itself without having to copy past this info.
Do you now if it is possible to play with label/tag from the web page into the script?
The iframe embedding your script will be loaded from a different domain than the PureCloud app and will therefore not have access to the parent page, and vice versa. You can update participant attributes on the conversation from the script so your embedded page can be authorized by the user and use the API to read them.
External web app executes implicit grant for the agent to authorize the app
External web app uses APIs to retrieve the user's current conversation information, then sets participant attributes as necessary.
Agent clicks a button in the page to retrieve data from participant attributes using a purecloud data action and display in the script. This step requires manual intervention because the script does not monitor for changes to the participant attributes after the initial script is loaded.
There are a whole lot of other ways you could implement data transactions with your external system, but the above is one possibility based on the information I have (only that you're using a script and an external web page).