Skip to main content

Writing Shopify Metadata

Write data to Shopify metafields based on customer responses

Written by Anthony Glover
Updated over 4 months ago

If a customer can be identified then data can be written to the customers metafields. A customer is considered identifiable in the case that they are logged in, on a post-purchase survey or they submit an email matching an existing user.

Metafields can be written in three ways:

1. Write the customers answer directly into a metafield.

2. Write a custom response based on the selected answer.
3. Write a custom value on completion of a survey.

Write the customers answer directly into a metafield.

  1. In the survey editor, select the target page (question) at the bottom of the 'questions' screen.


  2. Scroll to the bottom and find 'default action'


  3. Check the 'Save answer to customer metafield' box.


  4. Now, any time this question is answered the question will be written to this metafield.

Write a custom response based on the selected answer.

  1. In the survey editor, select the target page (question) at the bottom of the 'questions' screen.

  2. Beneath each answer option find the 'edit action' button.

  3. Click 'write customer metafield'

  4. Select the metafield to write and the value to write when this answer is selected.

  5. Now, any time this answer is selected the custom value will be written to the metafield.

Write a custom value on completion of a survey.

  1. Navigate to the 'actions' page of the survey editor.

  2. Switch on 'Customer metafield'

  3. Select the metafield to write and enter the value to write.

  4. This will be triggered when a customer fully completes the survey.

Did this answer your question?