Hello all,
Having a lot of issues to map customer metafields on celigo. any guidelines how to map it?
Thanks
Hello all,
Having a lot of issues to map customer metafields on celigo. any guidelines how to map it?
Thanks
Hi @Giovani_Marianne .... can you elaborate a bit more on the context? I want to make sure I respond on topic.
Hi @tonycurcio yes sure. I have a celigo custom flow integration (not the standard integration app celigo netsuite shopify). I have create a custom flow to create netsuite custom in customer shopify. I have created a metafield on a customer shopify ex. name and I have to populate a value into this metafield shopify. From my understanding, we need to map the key, namespace, type and value and it is still not populating the value. So, I am just wondering how to map a shopify metafield in celigo custom flow mapping? Thanks a lot
I haven’t done it with the mapping tool, but I’ve used GraphQL to successfully apply metafields in a custom flow.
My flow is for B2B, so I’m creating companies in Shopify instead of customers, and my metafield on the company is referencing a metaobject, but I think your process would probably be very similar.
My flow has 4 main steps:
1. NS Export: Get NetSuite customers for Shopify
2. Shopify Import: Create Company from Customer
company must exist before a metafield can be added to it
response mapping: response field _json.data.companyCreate.company.id becomes companyShopifyid
3. Shopify Import: Create Metaobject
Using GraphQL mutation metaobjectCreate
I added the definition in the Shopify admin before I set up the flow. I’m just adding entries for the already-defined metaobject, for each company.
You can skip this if you’re using metafields directly
response mapping: id becomes oceanMetaobjectId
4. Shopify Import: Ocean to Company
mutation SetCompanyMetafield($metafields: [MetafieldsSetInput!]!) {
metafieldsSet(metafields: $metafields) {
metafields {
id
key
namespace
value
}
userErrors {
field
message
}
}
}
SetCompanyMetafield{"metafields":[{"ownerId":"{{record.companyShopifyId}}","namespace":"company","key":"ns_ocean","type":"metaobject_reference","value":"{{record.oceanMetaobjectId}}"}]}
So those are referencing the ids that Shopify sent back as I created the company and metaobject entry in the previous steps, which I’d added to the record with response mappings.
Have you created the metafield on the customer in your Shopify admin?
Hope this helps.
Hello Emily,
Thank you a lot for your quick response and for all the information you provided. That was very helpful. Yes I am creating metafields on both the customers and company as well to check whether I am able to populate values in both fields. I am currently trying your approach but kindly reach out to me if you have further guidance on that point. I will keep you updated whether it works from my end.
Hello Emily,
Sorry for the late response. I was working on other part of the custom integration. I have tried to update the metafields via graphql however, i did not get any error but the metafields are not updated. PFA screenshots.
Any ideas why please?
Thank you in advance.
Are your keys typically quite long like that?
You may want to check, but I think the character limit for keys is 64.
Otherwise, I’m not sure. I would try sending it via Postman or another environment so that you know whether it’s Shopify or Celigo and maybe you can get more of a response. Or maybe someone else here will know.
Hello Emily,
I managed to do it. Thank you.