Hi, @Elty Welcome to our community! Thanks for including your code example. I have a few basic troubleshooting steps that will hopefully give our community members more details.
Ensure that the review object has properties globalScore and location and they are not null or undefined. You could debug this by checking the values of these properties before the replace function is called
There might be leading or trailing spaces in your placeholders. Make sure that ‘[score]’ in your content doesn’t have spaces like ‘[ score ]’. The same applies to ‘[location]’
The replace function is case-sensitive. Make sure the casing of your placeholders in the content matches with the ones in the replace function
If you’ve checked all of the above and the issue persists, please share more details about your review object and the content you are trying to replace.