The module interface is the set of variables that are able to be mapped to variables from a parent module when embedded, and initialized from the URL. You can think of the module interface as the API for a Workshop module.
To add a variable to the module interface, navigate to the Settings panel for a variable, add an external ID, and make sure the toggle for module interface is enabled. Optionally, you can give a module interface variable a display name and description, which will be shown when the module is embedded or used in an Open Workshop module event.
When embedding a module, the module interface variables for that module will be available to map parent module variables to child module interface variables. You can read more about this in interface configuration within the embedded modules documentation.
The Open Workshop module event can be used to avoid manually creating a URL, as described below. The selected module's interface will appear, allowing variable values to be passed from the current module to the chosen module's interface variables. When the event is called, the URL uses the current value to open the selected module.
Outside of the Open Workshop module event, a URL can manually be dynamically generated to allow sharing custom links to an application state using URL query parameter values for module interface variables. To do so, follow the steps below:
?
to the URL from step 2, followed by the external ID, =
, and the value you would like to set. For instance, ?interfaceVariable=123
. You can add other module interface variables by adding an ampersand &
followed by an additional external ID, equals =
the value.The link is now ready to be used and will define the module interface variable as the value set in the URL. This link may be generated dynamically by using variable transformations, with values coming from action forms, functions, or other variable transformations.
For testing purposes, you can change the /latest/
to /dev/
in the URL, and the link will now redirect to the last saved version of the Workshop application instead of the last published version.
Read about using module interface variables with Carbon navigation here. Note there are several limitations on types of variables that Carbon supports, and that external IDs must be prefixed with variable.
when configuring parameters for a Carbon module tab.