Update URL mapping configuration file
The Azure URL mapping function uses a configuration file called url-mapping-config.json that is stored inside a Mappings container in the storage account that is created within Azure.
To update the URL mapping configuration file:
-
Log into your Microsoft Azure portal page.
-
Open the storage account created above for the URL mapping (that is stimageproxydev001).
-
In the left pane, click the Storage browser (preview).
-
Click Blob containers.
-
Click mappings in the right pane containers.
-
Next to the url-mapping-config.json file. click ... to view and edit the file. The JSON file contains the following settings.
RequestResponse{ "ProductUrl": "/Products/{ProductNumber}_000_{SequenceNumber}.png", "ProductVariantUrl": "/Products/{ProductNumber} ^ {Style} ^ {Size} ^ {Color} ^_000_{SequenceNumber}.png", "ProductVariantWithConfigurationUrl": "/Products/{ProductNumber} ^ {Configuration}_000_{SequenceNumber}.png", "ContentHubGraphQLProductFieldToQuery": "ProductNumber" }
-
As required, update the Product URLs regular expressions or change the target field to query for a Product in Sitecore Content Hub.
-
Click Save and then click X to close the file.
The ContentHubGraphQLProductFieldToQuery field value must match the exact M.PCM.Product field name, must be a string field type, and must have the Include in content switch set to active (On) in Content Hub. The only exception is when you want to use an Identifier field.