Send contact form data to customer

Send contact form data to customer

ri31
Shopify Partner
39 2 15

Is it possible at all to send customer a copy of the message they sent the business?

 

When a customer feels about a contact form on the website, I want to send them an email that contains the information they filled out. I already have an internal alert to staff that contains the content of the form submission.

 

The workflow is triggered when a new metaobject entry is created. This part works.

ri31_3-1737725778461.png

 

 

For an internal email, I am using this code to send the form data. The internal email works.

 

{% for fields_item in metaobject.system.fields %}
{% if fields_item.definition.name and fields_item.value %}
{{ fields_item.definition.name }}: {{ fields_item.value }}
{% endif %}
{% endfor %}

ri31_2-1737725682780.png

 

To email the customer, I'm using the option to send a marketing email.

ri31_4-1737725907316.png

 

I copied the same code that's already working in the internal email over to a custom liquid block in the email to the customer.

ri31_5-1737726049202.png

 

When I send a test email, nothing shows up for form data. I can understand that, because there is no metaobject to pull data from.

 

However I also filled out a test form and got the email, but none of the form data shows in the email. What am I missing? Is it possible at all to send customer a copy of the message they sent the business?

 

 

If my post is helpful, hit Like to help others find a solution.
Reply 1 (1)

rajweb
Shopify Partner
823 71 155

Hey @ri31 ,

Yes, it is possible to send the customer a copy of the message they sent to the business, but you need to ensure you're correctly passing the form data to the customer email. The issue may be that the metaobject is not available when the email is triggered for the customer, which is why the form data is not showing up.

To resolve this, you could store the form data in customer metafields or another accessible location, and then use Liquid to pull that data in the email. This would ensure that the data is available when sending the email to the customer.

With over 8 years of experience, I can help you set this up properly. Please feel free to reach out via email so we can discuss more in detail. Thanks!

Best Regards,

Rajat

Rajat | Shopify Expert Developer
Need a reliable Shopify developer for your next project?
Our App: Productify Groups App
Email: rajat.shopify@gmail.com
Portfolio: https://rajatweb.dev