I have a scenario that takes an order from WooCommerce and then updates or adds a new Mailchimp subscriber. For an existing subscriber I want to update their record so I “Search Subscribers” in Mailchimp then update that subscriber.
I get “Function ‘mergeField’ finished with error! Cannot convert undefined or null to object” error but it doesn’t state where the error is or which field/s it pertains to so it is a somewhat unhelpful error message.
How can I locate which field/s are at fault?
Thank you
Hello @oshadhi and welcome to the Make Community!
In the screenshot you’ve provided you can see the Input to that module toward the bottom (it’s cut off in the image).
That should show you which fields were blank or null.
You can refer to Mailchimp API documentation to see which fields need data or are optional and whether they accept blank or null values.
1 Like
Thank you for your helpful response, @Donald_Mitchell I had removed parts of the screenshot I included that displayed personal customer details. I have now attached the screenshot with details showing that, indeed, some of the fields contain empty/null data.
But I don’t understand what to do…
In an earlier step I pull that subscriber from Mailchimp along with all their meta data from fields that exist in that subscriber’s record.
In this use case I am simply updating one or two fields based on a “prospect” becoming a (paying) “customer”. I pull the previous step’s fields and their data values and push those back to Mailchimp along with a new value that changes “prospect” to “customer” (I repopulate previous values in other fields so that a field’s populated value doesn’t get overwritten with null values.)
It appears that what is happening here is that a subscriber’s record has some fields that might be required but that are currently empty.
How can I accommodate for that? I cannot test for “if null do this else use existing data” on all fields because some records will have data in a field but others won’t.
None of the fields are set as “required” in Mailchimp and there’s nothing in the API docs that indicate which fields are “required”, and even if they were how I’d get round the scenario if one subscriber has that field already populated vs already empty.
Hi @oshadhi
IML function error is an error generated from Make’s side at the backend. This can also happen when you have inputted data in a format that Make’s IML function could not process.
If your input is right, then please raise this error to Make support team so their Dev team can update the IML function.
Regards,
Msquare Automation - Gold Partner of Make
Book a Free Consultation | Connect Live
Explore our YouTube Channel for valuable insights and updates!
@Msquare_Automation Well, I don’t know if my input is right, but I think it is. But I do know that I am pulling the entry from an existing field in Mailchimp and then sending the same back to Mailchimp and an empty field pulled from Mailchimp (which didn’t baulk when we entered the record with that empty field) is now choking when we try to push the same data back to Mailchimp.
So this appears weird - can you add your input, or confirm my suspicions, please?