Transform Customer tag to metafield birthday

Hello,

I created a birthday field in a register form.
This field automatically feeds a customer tag e.g. “date-of-birth: 05/12/1983” .
To make better use of this data, I’d like to convert this tag into a “facts.birth_date” metafield with a Flow.

I’ve created my Flow but I don’t know what information to enter in the fields below in order to transpose the date entered in the 05/12/1983 tag into the metafield.

  • Metafield namespace
  • Key
  • Value
  • Type

Best

I think you should know how to enter namespace, key, and type based on that facts.birth_date metafield … that info should all be available from the Admin.

To translate the value field, you can use liquid or the Run code action.

The date needs to be formatted in ISO8601 format. The shows help on how to convert dates https://shopify.github.io/liquid/filters/date/

To get that date out of your tag, you need to parse out the date-of-birth: part. You can use something like:

{{ tagname | remove:"date-of-birth: " | date: "%Y-%m-%dT%H:%M" }}