- Navigate to the Configure tab within your demo
- Use the snippet dropdown to see all available
- Press the New Snippet button and either select a template or blank snippet
- In the snippet type dropdown, choose between a custom JS snippet or a replay backend snippet. HTML Environment backend snippets are used for backend JavaScript edits and usually start with "replay_backend". Otherwise, use custom JS for any customizations you'd like to make.
- Choose a snippet category from the available options.
- Choose an app to apply this snippet. Follow the instructions in Settings to set up your Clone Environment App. Once configured, you can apply this snippet to the app and reuse it across multiple demos when capturing it.
- Decide whether to make this a global snippet using the toggle. Global snippets can be managed in settings in your Reprise portal.
- Write the snippet code and click "Save snippet" to save your changes.
- To delete your snippet, select the trashcan icon that appears next to it
To learn more, reference this Clone Environment Backend API document. You can use our API to manage requests made from apps to our backends. The main purpose of this is to allow custom responses for requests to be set at the replay-level. This could be used for a variety of different things including solving authentication state bugs, inserting data where needed to fix 404 errors, or customizing data in a replay.