I have some Custom Settings and Named credentials configured since I make call outs to external systems. But every time I refresh any of my sandbox, I have to manually update the Custom Settings and Named Credentials. I tried to create a Sandbox template but couldn't find a way to exclude Named Credentials and Custom Settings there. Also, thought of writing an APEX class which I can execute after refresh but I think Custom Settings can be updated via APEX but since Named Credentials is a read only object, I didn't find this option much suitable as well. Could someone advise what is the best practice to handle this situation?
Thanks in advance!