Services Plugins FAQs

Algolia Update - object : ARRAYS

Hello everyone,

the algolia plugin is quite nice. Though i am struggling to find the right syntax to update an object with an array of strings.

As you can see in the example below, updating the field " last_name_text" with a string is clear for me.
But
Updating the field “list_of_languages_text_list_text” which is an array of strings, i have zero clue about the syntax.

If anyone can help, this would save me !

Thanks a lot

Hello, @pro.sc.conseils
Thanks for using our plugin.

We will discuss the right syntax for specifying an array for this plugin internally and will revert to you with a detailed response asap.

Regards,

Hello, @pro.sc.conseils
I’m sorry for my late reply to your request.

We checked the possibility of updating the field “Update Object” which is an array of strings and it is really possible.

Please find below the screenshot with syntaxis for your use case, that can help you to set up correctly the plugin’s element:

Hope it will help you.
Regards,

I’m actually having a similar issue:

I’m getting a parse error: trailing garbage when I send an Update Object call.

it happens when i try and send more that 1 record in the tags array. E.g when I send "Tag": ["Wood"] it updates fine, but when i send "Tag": ["Wood", "Sustainable"] I get the error.

Full JSON object:
{ "Product Name": "Test 1", "Description": "Folk is a mercurial, but modest family of chair, stool and table designed for Allermuir by PearsonLloyd.\n\nFolk is both timeless in its seemingly familiar design, and timely in its modest and ingenious flexibility.\n\nStandard Features\nBeech ply seat with a clear finish\nBeech ply back with a clear finish\nCast Aluminium frame finished in Off-Black powder coat\nSolid Beech legs with a clear finish\nPlastic glides\nStacks up to 4 high\n\nOptional Features\nCast Aluminium frame available in a selection of powder coat finishes\nBeech ply seat, back and solid Beech legs available in a selection of colour washes or stains\nSolid Beech legs available in a selection of colour washes or stains\nOak ply seat, back and solid Oak legs with a clear finish\nSolid Oak legs available in a selection of colour washes\nPlastic glides with felt ", "Manufacturer": "Allermuir", "Product Subcategory": ["Side Chairs"], "Tag": ["Wood", "Sustainable", "Post-Consumer Recycled Content", "SCS Indoor Air Quality Certified", "BIFMA", "Beech", "Aluminum", "Stackable"], "Designer": "PearsonLloyd", "Lead Time": 6, "Certifications": "BS EN 16139:2013-Level 1\n\nANSI/BIFMA X5.1-2017\n\nIndoor Air Quality Certified to SCS-EC10.3-2014 v4.0", "List Price - Min": 600, "List Price - Max": 1200, "Product Category": ["Seating"], "SKU": "FLK101" };

Logs:

Workflow: