# UpdateProduct

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Unknown

Source code: <https://github.com/FrendsPlatform/Frends.Shopify/tree/main/Frends.Shopify.UpdateProduct>

{% tabs %}
{% tab title="Parameter: Input" %}

| Name                    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ProductId : `String`    | <p>The unique identifier of the product to be updated.</p><p><br>Default: <code>-</code><br>Example: <code>1234567890123</code></p>                                                                                                                                                                                                                                                                                                           |
| ProductData : `JObject` | <p>A JSON object representing the fields to update (e.g., title, body\_html, variants, images, etc.).</p><p><br>Default: <code>-</code><br>Example: <code>new JObject { \["title"] = "Test Product", \["body\_html"] = "Product Description", \["vendor"] = "Test Vendor", \["product\_type"] = "Test Type", \["variants"] = new JArray { new JObject { \["option1"] = "Default", \["price"] = "9.99", \["sku"] = "PROD-001" } } }</code></p> |
| {% endtab %}            |                                                                                                                                                                                                                                                                                                                                                                                                                                               |

{% tab title="Parameter: Connection" %}

| Name                     | Description                                                                                                                                                                                                                   |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ShopName : `String`      | <p>The subdomain of the Shopify store (e.g., myshop for myshop.myshopify.com).</p><p><br>Default: <code>-</code><br>Example: <code>myshop</code></p>                                                                          |
| 🗝AccessToken : `String` | <p>Shopify Admin API access token for authenticating requests.</p><p><br>Default: <code>-</code><br>Example: <code>Private: shpat\_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx OAuth: shpca\_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</code></p> |
| ApiVersion : `String`    | <p>The version of Shopify API to use</p><p><br>Default: <code>-</code><br>Example: <code>2025-07</code></p>                                                                                                                   |
| {% endtab %}             |                                                                                                                                                                                                                               |

{% tab title="Parameter: Options" %}

| Name                             | Description                                                                                                                         |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| ThrowErrorOnFailure : `Boolean`  | <p>Whether to throw an error on failure. True by default.</p><p><br>Default: <code>True</code><br>Example: <code>false</code></p>   |
| ErrorMessageOnFailure : `String` | <p>Overrides the error message on failure.</p><p><br>Default: <code>-</code><br>Example: <code>Failed to update product.</code></p> |
| {% endtab %}                     |                                                                                                                                     |

{% tab title="Result: Result" %}

| Name                | Description                                                                                                                                         |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean` | <p>Indicates if the task completed successfully.<br>Example: <code>true</code></p>                                                                  |
| Error : `Error`     | <p>Error that occurred during task execution.<br>Example: <code>object { string Message, object { Exception Exception } AdditionalInfo }</code></p> |
| {% endtab %}        |                                                                                                                                                     |

{% tab title="Changelog" %}

## Changelog

### \[1.1.0] - 2025-07-17

#### Changed

* Refactored to use real API in tests rather than mocks

### \[1.0.0] - 2025-06-19

#### Changed

* Initial implementation
  {% endtab %}
  {% endtabs %}
