We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Where is this API getting it's data new sn_sc.CatItem().getItemSummary()

Manoj89
Giga Sage

The getItemSummary() is returning following fields

{
  "short_description": "Pepwave",
  "kb_article": "",
  "icon": "",
  "description": "",
  "availability": "on_desktop",
  "mandatory_attachment": false,
  "request_method": "",
  "type": "catalog_item",
  "visible_standalone": true,
  "local_currency": "EUR",
  "sys_class_name": "sc_cat_item",
  "sys_id": "",
  "content_type": "",
  "price": "",
  "recurring_frequency": null,
  "price_currency": "EUR",
  "order": 0,
  "show_price": true,
  "recurring_price": "0,00 €",
  "show_quantity": true,
  "picture": "174490d8db32091065da0578f49619ec.iix",
  "url": "",
  "recurring_price_currency": "EUR",
  "localized_price": "0,00 €",
  "catalogs": [
    {
      "sys_id": "fb2f5c3cdb1fa6005f7d338ffe961954",
      "active": true,
      "title": "Catalog"
    }
  ],
  "name": "Pepwav",
  "localized_recurring_price": "0,00 €",
  "show_wishlist": true,
  "category": {
    "sys_id": "ionoiuo89089i9oj9o909089098n9",
    "title": "vutyt6"
  },
  "show_delivery_time": true
}

What needs to be done if want to add an extra field to be returned

1 REPLY 1

Not applicable

Hi @Manoj89 

 

This question is quite old, but I'm sharing a solution here to help future readers who might face the same issue.

We can use below code to achieve this,

 

var catItem = new sn_sc.CatItem("97a99c7483002210357c71a6feaad3a8"); //pass the sysId of the catalog item
var values = catItem.read({"table_name" : "", "price" : ""}, false); //pass the backend names of the variable which you are looking for
gs.info("Catalog item name: " + values.table_name);
gs.info("Catalog item price: " + values.price);

 

 

Mark this as Helpful / Accept the Solution if this helps.