Hi Team,
We have got one requirement to update the catalog item general details form section. Can anyone help us in updating it.
Thanks,
Venkat
Hi Team,
We have got one requirement to update the catalog item general details form section. Can anyone help us in updating it.
Thanks,
Venkat
Hi @venkatgupta,
Greetings!
I can’t see any API for this, perhaps we are missing something.
Let’s ask Freddy about this.
@Freddy, your thoughts on this?
Freddy said Hi @venkatgupta and @Bene_Immanuel,
Good day to both of you!
To update the catalog item general details form section, follow these steps:
Please let me know if you need further assistance or if you have any additional questions regarding this process.
Best regards,
Freddy
Thanks for your response.
with provided solution we need to manually update all catalog items. But, the requirement is to update all catalog items general section at once.
@Freddy Is there a way to update all catalog item general section at one place?
Thanks,
Venkat
Freddy said Hi @venkatgupta,
Thank you for the clarification. My apologies for the confusion in my earlier response.
To update all catalog item general sections at once, we can create a script to achieve this. Here’s an outline of the process:
Please find below a sample script that can be used to update catalog items:
var catalogItem = new GlideRecord('sc_cat_item');
catalogItem.query();
while (catalogItem.next()) {
// Update the specific fields in the catalog item general section
catalogItem.short_description = 'Updated Short Description';
catalogItem.description = 'Updated Description';
// Save the changes
catalogItem.update();
}
Please customize the field values based on your specific requirement and test the script before running it on the complete list of catalog items.
Let me know if you need further assistance or have any questions about this process.
Best regards,
Freddy
@Freddy, I could see provided solution is for ServiceNow form update.
I am looking for FreshService solution. Kindly provide the solution for FreshService
Freddy said Hi @venkatgupta,
Apologies for the confusion earlier. To mass update the general section of catalog items in FreshService, you can utilize the FreshService API for updating service catalog items.
Here is the process on how to do that using the FreshService API:
/api/v2/service_catalog/items
/api/v2/service_catalog/items/:id
To achieve this, you can use a simple Python script. Kindly install requests
library using pip install requests
before running the script.
Here’s a sample Python script to update all catalog items in FreshService:
import requests
# Set your FreshService API Key and Domain
api_key = 'your_api_key_here'
domain = 'your_domain_here'
# Function to get all service catalog items
def get_service_catalog_items():
url = f"https://{domain}.freshservice.com/api/v2/service_catalog/items"
response = requests.get(url, headers={"Content-Type": "application/json", "Authorization": f"Basic {api_key}"})
return response.json()
# Function to update a service catalog item
def update_service_catalog_item(item_id, updated_item):
url = f"https://{domain}.freshservice.com
Dear @Freddy ,
My request was to update the catalog item general form section not to update catalog item records.
Freddy said Hi @venkatgupta,
Apologies for the misunderstanding earlier. To update the catalog item general details form section in FreshService, you’ll need to follow these steps:
However, updating all catalog items’ general form section at once is not directly possible in FreshService. You will need to repeat the process for each item manually.
If you are looking for modifying a common field used in multiple catalog items, consider using “Form Fields” visible in every item. This way, editing the form field will reflect changes in all associated catalog items.
Please let me know if there is anything else I can help you with.
Best regards,
Freddy
With provided solution, we need to update each catalog item manually. But my requirement is to update catalog item general section at one place which should be available for all catalog items.
Hello,
Can you please provide more information about this update ,so i can see the changes.