Value fetching And save

Hello team,
I wrote some custom script linking erpnet and another system for e-invoincing. I am able to fetch some of the key values from the response json payload returned by the api and was able to add these values in my print format.

but when i logout from erpnext and when i login in back again these values dont appear agin in print format. i kindly need your help.

sample of the values fetched, but dissappear when i logout or leave the print format.