Add an Order Tag from a Customers Metafield Value

Hey Paul

Lets say the full metafield value is "John Doe 555-555-5555 name@email.com"

Is it possible to change the tag to say something different? If metafield is above, than tag “JOHDOE”

If metafield = "Jack Black 555-555-5555 name@email.com"

Tag order with “JACBLA”

Would the tag code look something like this? Please correct if its wrong…

{% for mf in order.customer.metafields %} {% if mf.namespace == ‘global’ and mf.key == ‘slspsn_name’ and mf.value == 'John Doe 555-555-5555 name@email.com’ %} {{ JOHDOE }}{% endif %}{% endfor %}
{% for mf in order.customer.metafields %} {% if mf.namespace == ‘global’ and mf.key == ‘slspsn_name’ and mf.value == 'Jack Black 555-555-5555 name@email.com’ %} {{ JACBLA }}{% endif %}{% endfor %}