It is fairly simple to edit the user parameters. Model parameters are also possible but a little more difficult because they can be scattered around in various components whereas there is only one set of user parameters for the entire design.
The program below changes two user parameters called "Length" and "Height" and depending on how you answer the message box will change them to one of two sets of values. You can change the names to whatever your parameters are called. Setting the expression property is exactly the same as changing it in the dialog and it supports all of the same things. For example you can specify the units as part of the string, i.e. "3 in" or "2 mm". Just "3" will default to 3 of whatever the current design unit is. You can also use equations and reference other parameters. For example, "(3 + Length)/2". If you use the "Scripts and Add-Ins" command to create a new script you can copy the code below and replace the run function in the created code. Then you can run it from the "Scripts and Add-Ins" command.
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
des = adsk.fusion.Design.cast(app.activeProduct)
userParams = des.userParameters
if ui.messageBox('Change to configuration one?', 'Parameter Edit', adsk.core.MessageBoxButtonTypes.YesNoButtonType, adsk.core.MessageBoxIconTypes.QuestionIconType) == adsk.core.DialogResults.DialogYes:
userParams.itemByName('Length').expression = '50'
userParams.itemByName('Height').expression = '30'
else:
userParams.itemByName('Length').expression = '30'
userParams.itemByName('Height').expression = '20'
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))