submitConfig()
The submitConfig() function submits the configuration to the transaction record and lets you choose whether resetting questions and answers after submitting it. At the end of the processing, the function saves the transaction.
Syntax
Use this syntax for the submitConfig() function.
submitConfig({
afterSubmitAction: string,
restart: true | false,
product: number
});
Parameters
All parameters are optional.
The submitConfig() function can take the following parameters:
-
afterSubmitAction- Determines what happens after submitting the configuration. This parameter is optional. If omitted, it defaults to theclosevalue. This parameter can take the following values:-
close- Submits the configuration and doesn't reset questions and answers. This is the default value. -
copy- Submits the configuration and doesn't reset questions and answers. -
new- Submits the current configuration and then resets questions and answers.
-
-
restart- If false, the processing flow continues to the next action. If true, the processing flow restarts from the first before-event action and continues to refresh building blocks, and run after-event actions. This parameter is false by default, and you can omit it.Note:If you call
submitConfigwithrestart : true, any actions after that action won't run because the restart will happen after the current action has completed. If you need all actions to run, make sure you apply it to the last action of the queue. -
product- The product ID used when restarting the processing flow with a new product.
Parameter Combinations
The table shows the possible parameter combinations for the submitConfig() function.
|
after |
restart Parameter |
product Parameter |
Defaults To |
Description |
|---|---|---|---|---|
|
Not set |
Not set |
Not set |
|
|
|
|
Not set |
Not set |
|
|
|
|
|
Not set |
- |
Warning:
This parameter combination is incompatible. Restarting the processing flow isn't possible when |
|
Not set |
|
Not set |
|
|
|
|
|
Not set |
- |
|
|
Not set |
|
Set |
|
|
|
new |
|
Set |
- |
|
|
|
|
Not set |
- |
|
|
|
|
Set |
|
Note:
The |
Examples
See examples for the submitConfig() function.
Restarting the Conversion Process with a Specific Product
This examples submits the configuration and restart the processing flow using a specific product (product ID 13).
submitConfig({
afterSubmitAction: 'new',
restart: true,
product: 13
});