How to automate Stock Entries

I want to be able to do a Stock Entry doctype in the background, without having to show it on the screen in ERPNext application. The fields of Stock Entry doctype would be filled in automatically.

This is possible? In that case, how do I do it?