How can we standardize the variables for sandbox and prod?

How can we standardize the variables for sandbox and prod?
For e.g.
Source name would be different in both the environment.
Don’t want it to be hardcoded rather than can we standardize the variables? So, that automatically it will assign for both the environment.

It depends on what objects you’re trying to standardize. Some rules, for instance, will offer you the application object, in which case you can reference application.getName() for your source name.

That’s a little limited, however. I generally recommend using the same source names for sandbox and production. It makes migration much more seemless. There are still some places that can’t share values between sandbox and production, (such as HTTP request in a workflow- where you would need to reference an id), but those are far less common.

Is there a specific reason you want your sources named differently in sandbox and production?