Skip to main content
All CollectionsSalto for Zendesk
Fetching Zendesk Guide Themes
Fetching Zendesk Guide Themes
Dan Avigdor avatar
Written by Dan Avigdor
Updated over 4 months ago

Fetching Zendesk Guide Themes with Enhanced Reference Management


You can use Salto to fetch your custom Zendesk Guide Themes, allowing you to version control your custom code, compare your Themes between Sandbox and Production, and deploy updates to Guide Themes across environments without having to manually update references to internal Zendesk IDs.

When integrating Zendesk Guide Themes into your workflows, it is crucial to manage JavaScript file references accurately due to their unstructured and dynamic nature in codebases. To ensure seamless theme management and deployment across various environments, we have implemented two strategies for reference detection and handling:

  1. Prefix Strategy (default and recommended): Users can prepend a unique identifier (e.g., "PREFIX_") to each variable declaration that holds a reference. This prefix serves as a clear signal for Salto to identify and extract these references during the theme fetching and deployment process. This method enhances the clarity and traceability of references throughout the code, facilitating more reliable operations.

  2. Numeric Identification Strategy: As the previous method necessitates code changes, some users might prefer a less accurate strategy. Specifying a minimum number of digits (e.g., 6) enables the system to treat any sufficiently long numeric sequence as a reference. This approach is particularly useful for automatically recognizing and processing embedded numeric references that are critical for theme configurations.

Example Configuration for Reference Management:

To effectively manage Themes using the prefix strategy, update your configuration as follows:

guide = {
brands = ["MyBrand",]
themes = {
brands = ["MyBrand",]
referenceOptions = {
enableReferenceLookup = true
javascriptReferenceLookupStrategy = {
strategy = "varNamePrefix"
minimumDigitAmount = "PREFIX_"
}
}
}
}

For the numeric identification strategy, the configuration might look like this:

guide = {
brands = [".*"]
themes = {
brands = [".*"]
referenceOptions = {
enableReferenceLookup = true
javascriptReferenceLookupStrategy = {
strategy = "numericValues"
minimumDigitAmount = 7
}
}
}
}

These strategies ensure that all references, whether textual or numeric, are accurately recognized and handled by our system, thus maintaining the integrity of your theme deployments across different staging and production environments.

Did this answer your question?