Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The "attribs" column now stores information in a JSON format, offering flexibility for diverse data storage. Here's an example of how this data will be represented on the UI.

UI representation

...

JSON

Code Block
{
  "Manufacturing date": "2023-12-01",
  "HSC Code Title": "KURTA LONG- H.S.C. 62113900 Cotton and MMF (Blended) (size-36-44)",
  "Custom Title": "Custom title can be added here"
}

Business Logic

A new company-level setting, "SKU Attributes Setup," has been introduced under inventory section, to control which additional information can be added to the sku attribs.

UI Representation

  1. Adding SKU Allowed Attribs Setting:

Note: Once an attribute is added, user cannot delete or edit due to potential existing SKU data. A warning message will notify you of this restriction.

...

JSON

Code Block
languagenone
{
  "sku_allowed_attribs": [
    {
      "name": "Manufacturing date",
      "type": "date"
    },
    {
      "name": "HSC Code Title",
      "type": "string"
    },
    {
      "name": "Custom Title",
      "type": "string"
    }
  ]
}

Using the New Settings

UI for Adding or Changing SKU Allowed Attribs Setting:

...

...

Look for the new section SKU Attributes Setup.

...

Add up to 15 attributes with the specified data types.

...

Note: Once added, attributes cannot be deleted or edited due to potential existing SKU data. A warning message will notify you of this restriction.

...

Show/Save SKU Attribs for Each SKU:

  1. Access the "skus/view" page.

  2. Find the toggle button near the headline.

  3. image-20240202-100159.pngImage Modified
  4. Input values for the required attributes.

  5. The system runs validations based on the data type provided in the company setting.

  6. Save the "attribs" with the latest information.

...

JSON

Code Block
{
  "Manufacturing date": "2023-12-01",
  "HSC Code Title": "KURTA LONG- H.S.C. 62113900 Cotton and MMF (Blended) (size-36-44)",
  "Custom Title": "Custom title can be added here"
}

...

Info

Important Note:

  • If the "SKU Attributes Setup" setting is not found, the attributes section will not be displayed on the SKU detail view page.

  • Additionally, we shall be expanding this feature to below mentioned sections.

    1. Bulk upload at Bulk Upload

      1. If sku_allowed_attribs found

        1. add all above additional columns in the bulk add file

        2. while saving, validations on data type will be picked from sku_allowed_attribs

    2. Bulk update at Bulk Update

      1. If sku_allowed_attribs found

        1. all above additional columns in the bulk update file will be made available

        2. while saving, validations on data type will be picked from sku_allowed_attribs

    3. Product creation at Product Creation form

      If sku_allowed_attribs found

      Add new options on the UI, Add Additional Info

    4. Show the fields from sku_allowed_attribs only once the user clicks on "Add Additional Info

      1. load the sku_allowed_attribs on this page

      2. while the user inputs the data, validations on data type will be done while the user inputs the data.

    5. GET SKUs API

      1. If sku_allowed_attribs found

        1. In the api response, show the newly added column and the data in it as encoded json

        2. { "success": "true", "result_count": 1, "results_per_page": 1000, "page": 1, "data": [ { "Sku": { // ... (existing data) }, "sku_meta": { "custom_item_title": "KURTA LONG- H.S.C. 62113900 Cotton and MMF (Blended) (size-36-44)", "hsc_code": "76389467", "category_description": "Long Kurta Beige", // and more from the sku_meta... }, // ... (existing data) } ] }

    6. POST SKUs via POST SKUs

      If sku_allowed_attribs found

    7. For updates, use SKU Update API.

    8. before saving, validations on data type will be picked from sku_allowed_attribs and shown in api response.

      1. [ { "custom_code": "XYZ1", "readable_name": "iPhone 4s White 64GB", "product_family": "iPhone 4s", "opening_stock": 1000, "low_stock_warning_at": 5, "default_cost": 25000, "least_selling_price": 26999, "currency": "INR", "length_mm": 10, "breadth_mm": 10, "height_mm": 10, "weight_gm": 800, "image_url": "<https://dl.dropboxusercontent.com/u/56339967/Images> /ONBTBTMOOM0004.jpg", "hsn_code": 1234, "brand": "USPA", "sku_meta": [ { "custom_item_title": "KURTA LONG- H.S.C. 62113900 Cotton and MMF (Blended) (size-36-44)", "hsc_code": "76389467", "category_description": "Long Kurta Beige", } ] } ]

      2. Integrating parties will have to configure this these field mapping dynamically basis the fields available in the api.

...