BigCommerce Update Product Search Parameters

Can anyone explain to me how to use these search parameters on the BigCommerce API or send me to a resource that does? I am confused on how these are supposed to work. Are they supposed to change the API URL? I am just trying to use the “Create or Update Product” feature and identify an existing record. Shouldn’t be that difficult to search for an existing record using the “mpn” field for example?

We add these to query parameters in the API GET call and are most likely using this API (Products | BigCommerce Dev Center). So you should just be able to put in {{{mpn}}} into the mpn field there (change it to whatever your record mpn field name is).

Thanks @tylerlamparter but I don’t see mpn as a query field. There is upc, sku, name, id and others but not mpn. Can it be searched using mpn={{mpn}} as keyword?

Gotcha, so it seems we are missing that in the form. We will have this connector moved to the new HTTP 2.0 framework soon, where you'd be able to add your own if not listed. For now, save the config like this and put something random in the name parameter. From there, save the import, then change the form view to REST API, and then change the dynamic lookup to use mpn parameter instead of name.

So this seems to work as far as generating the proper GET url and it returns proper data in Postman. It does give me an “invalid_json” error in the preview but I am trying to understand your {{{lookup.product_id}}} reference. I can see you name your lookup product_id but is lookup a generic reference? Can you elaborate on this please?

I think the lookup handlebar will only work in runtime, not preview. The lookup handlebar just references the dynamic lookup made on that "Identify existing records" section.

Okay, sorry Tyler. I don’t get how the ID from the lookup makes it into the PUT update of the relative URI. {{{lookup.product_id}}} does not resolve for me in the UI.

@tylerlamparter I tested it with the {{{lookup.product_id}}} and I guess it seems to work. It’s just not clear why or how that works but if that is the specific handlebar for the previous lookup fine.

I appreciate your help once again. Thank you.

1 Like