Use Case 2: Use the Deep Link to Add a Custom Element
Add a Custom Element component to your app. Edit the component, and enter the URL for your script in the Basic Info section. Click the Settings Panel tab and add custom parameters to the Settings panel, adding keys and values for each parameter. Values depend on the type of parameter - default text, toggle on/off, slider value and so on.
Use the API to create a URL that will open the user's Editor and then add the Custom Element component to a page.
You can further customize each generated URL by adjusting the values of the custom parameters. This is done passing new values in the body of the request.
Parameters passed in the body of the API request will only populate the Settings panel if their keys match the keys already present in the settings panel.
When users install your app they have access to the same settings panel. The values you set, either in the Settings panel or in the body of the API request, are presented to users as defaul or initial settings that can be changed by the user.
An Example of Using the Custom Element
Consider an app that adds a lead generation form. Site owners create forms via the app's dashboard, and each form has a unique id. Next to each form in the dashboard the developer adds an “Add to Site" button. It uses the Editor Deep Link API together with the unique form id as a custom key-value pair into a Settings panel field with the same key. When site owners click the button, they are taken to the Editor and the form is added to the page.