How to target Address merge field?

Created on 2 December 2014, over 9 years ago
Updated 31 January 2024, 5 months ago

I have a webform which is doing fine sending most types of data to Mailchimp. However, I have postal addresses (constructed as individual fields in Webform) which I want to send to Mailchimp. What merge tag do I use?

The overall merge tag in Mailchimp is ADDRESS. I took a look at the Mailchimp API documentation and found the fields seem to be listed there under "contact":

  • address1
  • address2
  • city
  • state
  • zip
  • country

I've tried various combinations such as:

ADDRESS|post_code
ADDRESS:ZIP|post_code
ADDRESS:zip|post_code
ADDRESS{zip}|post_code

...etc, etc - but can't get any data into the address field.

Any suggestions please?

πŸ› Bug report
Status

Needs work

Version

5.9

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom adam_b

Live updates comments and jobs are added and updated live.
  • Needs documentation

    A documentation change is requested elsewhere. For Drupal core (and possibly other projects), once the change has been committed, this status should be recorded in a change record node.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡ͺGermany mrshowerman Munich

    Re-roll of #5.

  • πŸ‡¨πŸ‡­Switzerland lomale@bluewin.ch Switzerland

    Hi im back
    As mentioned in #13

    litte difference. I had to take away the Quotation marks
    compared to #4

    FNAME: [webform_submission:values:first_name]
    LNAME: [webform_submission:values:last_name]
    PHONE: [webform_submission:values:phone]
    ADDRESS:
    addr1: [webform_submission:values:your_address:address]

    But now running Drupal 9.59 and Webform Mailchimp 8.x-5.10

    it only works with Quotes

    FNAME: '[webform_submission:values:vorname]'
    LNAME: '[webform_submission:values:name]'
    ANREDE: '[webform_submission:values:gender]'
    TITEL: '[webform_submission:values:titel_beruf]'
    PHONE: '[webform_submission:values:phone]'
    ADDRESS:
    addr1: '[webform_submission:values:address:address]'
    city: '[webform_submission:values:address:city]'
    state: '[webform_submission:values:address:state_province]'
    zip: '[webform_submission:values:address:postal_code]'
    country: '[webform_submission:values:address:country]'

    so it works again.

  • πŸ‡ΊπŸ‡ΈUnited States solarDog

    Drupal 10.2.2
    Webform Mailchimp 8x5.10

    I am having similar issues with mapping my webform (6.2) address fields to the mailchimp Address.
    I have tried patch from #16 with no success. The contact does not come into mailchimp using the patch, so I have reverted.
    Does not seem to make a difference if I use quotes or not.

    FNAME: '[webform_submission:values:first_name]'
    LNAME: '[webform_submission:values:last_name]'
    COLLUNIV: '[webform_submission:values:college_university]'
    DEGREE: '[webform_submission:values:degree_program]'
    PHONE: '[webform_submission:values:phone_number]'
    ADDRESS:
    addr1: '[webform_submission:values:your_address:address]'
    city: '[webform_submission:values:your_address:city]'
    state: '[webform_submission:values:your_address:state_province]'
    zip: '[webform_submission:values:your_address:postal_code]'

    Everything but the address comes into with the Mailchimp contact. Does anyone have any insight into why this would be happening?

Production build 0.69.0 2024