All good, my script works, thanks @argumentum @SmOke_N.
Now, I have a single large script which creates a sales order and dispatches a sales order. This script currently runs only ones per user. My intention now is to create a load by running this script in multiple sessions (concurrent/parallelly) to simulate multiple users trying to access Pronto create sales order at a time.