Requirements
Mega Menu Update – Update or create the new categories based on the list shared
Redirections – We need to create a script for to create redirect records for any updated categories
Solution
Redirect record CSV File for Mega menu Update
We have created a suitelet page, here we can create a CSV file to create the redirect record in a bulk manner.
1. Initially, we need to create a JSON file that contains the old data. This file will be created using a button click on the suitelet page. The button is only available if there is no file available.
2. We have added a field for uploading the file that contains the internalIDs of the corresponding site category records that needs the redirect record creation.
3. On submission, the CSV file will be downloaded. The CSV file will be created with the comparison of old data in the JSON file that is already created before the update and with the list of internal IDs that to be updated.
For the redirect record creation, currently, we have considered if there are any changes occurring in the fields inactive or url component.