The ideas is to build the file name from the contact ($9), the SR number ($2), and the subject ($1 after translating some characters to ‘_’). And then download using the url used for the ‘print’ view. The authentication is easy with -auth=ID:PASSWD the argument where you pass your Oracle SSO login username and password. Just replace and with yours.

Note that you should not try to run that in parallel or you will get ‘The user has already reached the maximum allowed number of sessions’.