Loading

Feature change to honor job-hostnames during custom job run Image URL Generation for e.g down stream feed jobs like marketing feed of product data

Julkaisupäivä: Jul 29, 2026
Kuvaus

Change summary. Script API methods that generate image URLs now honor the site Aliases JSON job-hostnames when invoked inside a job context. Previously, these methods ignored the job-hostnames entry for the site + locale and fell back to the default instance hostname (for example, *.demandware.net).

Please refer to the job hostname examples at https://help.salesforce.com/s/articleView?id=cc.b2c_hostname_aliases.htm&type=5.

"job-hostnames":
   {
     "default":"www.my-default-host.com",
     "de":"www.my-de-host.com",
     "en":"www.my-en-host.com"
   }

End outcome and impact. Image generation operations that run outside a standard storefront request, such as catalog exports, automated messaging, and product feed generation, will use the correct customer-defined hostname. The operations will no longer fall back to default instance hostnames such as *.demandware.net.

Benefits for development and operations.

  • Consistency. Ensures image URLs follow the same hostname behavior as standard pipeline URLs.
  • Efficiency. Removes the need for developers to implement and maintain regex fixes to correct URLs produced during job runs.
  • Reliability. Provides the correct host context for imaging operations, reducing broken image links in external communications or third-party integrations.

Applicable Script API methods within a job context.

  • MediaFile.getHttpsImageURL(): Generates a secure (HTTPS) URL for the media file.
  • MediaFile.getAbsImageURL(): Generates an absolute URL for the media file.
  • MediaFile.getHttpImageURL(): Generates a standard HTTP URL for the media file.
  • URLUtils.httpsImage(...): Generates a secure DIS image URL for a product image.
  • URLUtils.imageURL(...): Generates a DIS image URL for a product image.

How to enable. This feature is controlled by a domain-specific feature toggle to avoid unexpected changes to public APIs for existing implementations.

  • Toggle name. JobHostnameForImagingUrlGenerationEnabled
  • Default state. Disabled (false)

To enable the feature for your environment, contact Salesforce Support and request enablement of the JobHostnameForImagingUrlGenerationEnabled feature toggle.

Knowledge-artikkelin numero

005390237

 
Ladataan
Salesforce Help | Article