Let's say I want to boost offers by the moon phase in customer's city.
I created a journey with a custom action that calls an API to get the moon phase by customer's city from the profile. So far so good.
I also created a collection of offers, each having a MoonPhase attribute, e.g. Full Moon, Waxing Gibbous, Waning Crescent, etc.
Now I want to to boost the offer that matches the current moon phase in the customer's city. I tried many options and none worked:
if( offer.characteristics.get("MoonPhase") =@{_xdm.context.additionalParameters;version=1}.current.astro.moon_phase , offer.rank.priority * 2, offer.rank.priority)
or
if( offer.characteristics.get("MoonPhase") =@{_xdm.context}.journey.actions.6de23cbe-8c56-431f-8293-2c4b691e99fd.current.astro.moon_phase , offer.rank.priority * 2, offer.rank.priority)