Multipass & Metafield

From https://help.shopify.com/en/api/reference/plus/multipass

I learned that we can pass the following in the JSON:

  • email (required)
  • created_at (current timestamp. required)
  • first_name
  • last_name
  • tag_string
  • identifier
  • remote_ip
  • return_to
  • addresses

My question: Can we pass (auto-create) metafields in Multipass?

(outdated: https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/multipass-meta-fields-217851 )

There’s no metafield parameter that you can pass in the request, so no. You need to look into adding the metafields after the customer has been created.

Actually, you can SOMETIMES send metafields as part of your multipass request, but the implementation seems inconsistent. I got it to work once, but the value of the metafield came through as zero (!); subsequent attempts did not create any metafields (!!).

Other points of note:

  • If you create a customer using the regular API and then log in using multipass, you must create the customer with a multipass_identifier, and you must include the exact same value in your “identifier” when you gather your customer data for use in creating the multipass token. If you don’t include this, the multiplass login will not work.

  • After logging in via Multipass, the customer search API may not show results for a few minutes. I’m guessing this is because of a spotty caching implementation.

  • After you DELETE a customer, the customer can still show up in Shopify API requests (e.g. a customer search). This is probably because of the same spotty caching implementation.

  • If you’re curious as to whether or not you get better support with more expensive plans, the answer is no: your “representative” will direct you here to the community forum because nobody at Shopify seems to know the answers.

It would be nice if Shopify would spend more than a trivial amount of time on their documentation so its users didn’t have to plumb the depths of its black box. It would take its developers mere seconds to include a list of fields allowed in that request, but it might take the community at large many man-hours of fumbling in the dark – that is unforgivable. Ask yourself how a professional eCommerce company would handle the documenting of its API. Unless you’re aiming for haphazard mediocrity, the answer will not include omissions in the formal docs and directing customers to the forum.