Catalog item
Summary
Servicely catalog is a structured request mechanism for self service users to easily request / report / query offerings / services of the business. This could be used to request standard IT offerings, Health and Safety reports, Facilities issues, HR questions, etc.; anything the business has standardised the options and questions specifically associated with such items.
Servicely has taken a unique approach to solving, what is a relatively simple concept, yet is often complex to configure and maintain. Complexity is normally associated with conditional fields, form layouts, and work / task generation. The approach Servicely has taken mitigates that complexity, and has distilled a catalog to the following key concepts:
There are a set of pre defined "questions" that need to be answered by the user
Those questions may be defaulted, such a location question could be set by default to be the location of the user
The questions that are asked of the user can be dependent on the answers to earlier questions (e.g. PhoneType is iPhone) - this provides conditional logic
A questions (or group of questions) have a preceding question - this provides to flow
Any record of any Table can be generated, with fields derived from answers
Specific or common workflows / approval process can be applied
To configure a Catalog item, navigate to: Administration > Catalog > Catalog items.
The following image shows the configuration form of a catalog item:
Configuration
The keys parts of the configuration are best thought of as two main concepts:
The Catalog item itself, which defines to overall item from a display, visibility, and record generation configuration
The Questions, with associated conditions / flow for the Item
Catalog item
The following table summarises the configuration fields for the Catalog item:
Field | Type | Example entries | Notes / Description |
---|---|---|---|
General fields | |||
Name | String | Apple iPhone 15 | The name of the item that will appear in the catalog for this item |
Display name | Localised string | Apple iPhone 15 | Localised name of the catalog item (to be translated into other languages as required) |
Category | Reference (Catalog category) | Mobile phones | The category in which this item is found. The Category structure is a hierarchical structure (see details here TBC**) where categories have sub-categories, and a catalog item can live in any of those category / sub-categories). |
Active | Boolean | True | Only active catalog items will only appear in categories and search results |
Order | Integer | 10 | The order that highlighted items (see Highlight field below) will be priorities to appear in the Portal. The lower the number, the higher the priority. |
Item configuration - Portal display | |||
Highlight | Boolean | Yes | A candidate to be a highlighted item in the portal, only the highest ranked items that can "fit" in the portal category widget will be highlighted. *** point to portal page that shows this *** |
Summary | Text | Latest iPhone by Apple, equipped with latest CPU and Camera sensors | Text that is used in the portal, and in the item display, that summarises what this item is. *** refer to an annotated screen screen shot *** |
Display summary | Localised text | Latest iPhone by Apple, equipped with latest CPU and Camera sensors | Localised summary text of the item |
Image | Image | Image that is used in the portal, and in the item display, that provide visualisation of what this item is. *** refer to an annotated screen screen shot *** | |
Item configuration - Item display | |||
Expected question percentage | Percentage | 80% | Used to help "seed" better progress indicator. 100% means that it is anticipated that all configured questions will be asked, and 80% would mean that in the average case, approximately 80% of questions will be asked (as some are conditional). The progress indicator accuracy improves as questions are asked, and this value help ensure the earlier questions are showing a more accurate value. The default is 100%. **** refer to an annotated screen shot **** |
Description | HTML | <p>A new dual‑camera system captures more...</p> | HTML formatted detailed description of the item. |
Display description | HTML | <p>A new dual‑camera system captures more...</p>
| Localised HTML formatted detailed description of the item. |
Two columns | Boolean | Yes | If set to Yes, the catalog item view will be split into two columns and the questions will be distributed over two columns. |
Item configuration - Visibility | |||
Roles | Multiple reference (Roles) | platform_selfservice | User must have one of the roles specified to have this item visible in the portal. If no roles are specified, it will be available to all users. Note: For an item to be visible to a user, the Roles, Groups, and Entitlement script must all be satisfied. |
Groups | Multiple reference (Groups) | Southern region | User must a member of one of the groups specified to have this item visible in the portal. If no groups are specified, it will be available to all users. Note: For an item to be visible to a user, the Roles, Groups, and Entitlement script must all be satisfied. |
Entitlement script | Script | answer = user.getCompanyID() == "790c962fa6046311ef9a0ab84ad342e3" || user.getCompanyID() == "5142362fa6046311ef9a09ak7od342e3"
| For complex visibility rules, any business logic can be scripted in this field, with a boolean result set in the answer variable. If no script is specified, it would be the equivalent of: answer = true; Note: For an item to be visible to a user, the Roles, Groups, and Entitlement script must all be satisfied. |
Item configuration - Behaviour | |||
Clear answers if hidden | Boolean | No | If set to Yes, applicable for all catalog questions, when a Catalog question is hidden, then its value will be cleared |
Item configuration - Advanced | |||
Post-processing script | Script | if (questions.Storage.value() == "64GB") {
answers.AreYouSure.mandatory = true;
}
answer = answers; | Can be used to modify questions and answers before they are sent back to the UI. Can be used to make questions to be readonly or mandatory. It must set the answer variable |
Record generation configuration - Detail | |||
Direct to link | Boolean | True | When selected, open link in the Link fields for this item instead of using Catalog questions. The default is false. |
Link | String | #/Incident/_create/SelfService | When "Direct to link" is selected, this is the link to open instead of the Catalog questions. If the Link is empty, it will automatically link to the Self Service create for the Table selected. |
Table | Table | ITSM Request | The Table of the record that will be generated by the item. |
Name field | Choice (List of fields associated to Table) | Short description | The field on the generated record where, by default, the Name of this Item will be copied. For instance, "Short description" on Request records. Note: this may be overridden with a more specific description in the Questions configuration. |
Workflow | Reference (Workflow) | Special request approval | For specialised workflow and approval processes, a specific Workflow can be configured. If none are configured, it would follow any standard Workflow configured in the system for the Table of the generated record. |
Button text | String | Order phone | Depending on the nature of the item, the completion button may be Submit, Order, Complete, Request, etc. If nothing is specified, "Submit" will be the default button used. |
Record generation configuration - Advanced | |||
Generation script | Script | current.Location(current.questions().MyLocation.value()); | Complex record generation may be scripted. The current object of the configured Table is available in the script. Use current.questions() to access answers to questions. Note, fields in the generated record may also be configured to be populated in the associated Questions. This scripts is executed as the final stage of record generation, after all other fields have been populated, and before it is saved. Note that this Script also has access to Script Libraries Example here is if we are setting target Table’s field called “Location” with the answer from Catalog Question called “MyLocation”. |
Catalog item questions | |||
Questions | Multiple reference (Question) | The Questions associated with this catalog item. Each question deals with the preconditions, defaulting, etc. See Questions configuration below. |
Questions
Field | Type | Example entries | Notes / Description |
---|---|---|---|
General fields | |||
Name | String | PickAStorage | Name of the question, used for scripting. |
Preceding question | Reference (Question) |
| Question presented prior to this one. |
Parent | Reference (Catalog item) | Apple iPhone 15 | Auto populated if you are creating the Question out of a catalog item |
Active | Boolean | Yes | If the Catalog Question is to be displayed and used. |
Order | Integer | 20 | Order of this Question in the Catalog item view. Lower number is shown first. |
Question | Localised string | Pick a storage | This will be the question label presented on the catalog form to the user |
Tooltip | Localised string | This is how much how you can store (in GB) in your iPhone | Used to provide help or extra context for the question |
Field instructions | Localised string | Please note that 1 GB = 1000 MB | To use this functionality, you need to be on Version 1.10 or later. This allows you to display instructions above a field question will always show up. |
Question configuration - Question type | |||
Data type | Choice (List of data types) | Choice | Types are:
|
Readonly | Boolean | No | If yes, means cannot be populated/answered |
Mandatory | Boolean | Yes | If yes, means has to be populated/answered |
Background only | Boolean | No | If yes, means the question will never be shown to the user. The question would usually be defaulted |
Available values | Choice builder | 256GB 512GB | This will only display if Data type is “Choice” |
Reference Table | Table |
| This will only display if Data type is either “Reference” or “Multi reference” |
Reference filter | Reference (Reference filter) |
| Refere to Reference filter |
Question configuration - Precondition | |||
Precondition | Condition builder |
| If configured, the condition has to be met before this question will display |
Precondition script | Script | questions.MyColour.value() == "Green" | If configured, the script has to evaluate to true before this question will display |
Question configuration - Question display | |||
Section title | String | iPhone variants | Catalog questions can be grouped into section. The first question in the section (sorted ascending based on the catalog item’s Questions' Order) should have the Section title field populated. |
Display section title | Localised string | iPhone variants | Localised section title text that will be displayed to the user on the catalog form |
Close section after | Boolean | No | This should be set to Yes for the last question in the section (sorted ascending based on the catalog item’s Questions' Order), to place next questions in separate sections |
Hide section if hidden | Boolean | Yes | If set to Yes, then all questions in the section that this question is part of, will be hidden whenever this question is hidden. A common use case to set this field to be Yes:
|
Question configuration - Behaviour | |||
Clear answer if hidden | Boolean | Yes | If set to Yes, when a Catalog question is hidden, then its value will be cleared |
Validation script | Script | let userRec = Table("User")
.EQUAL("UserName", value)
.query();
if (userRec.next()) {
answer = "Username not available";
} else {
answer = "";
} | To provide field validation equivalent functionality on service catalog questions. If there is a validation issue, set an error text on the answer variable and that will:
|
Question data - Generated record | |||
Record field | Choice | C_Storage | Pick from Fields that are on Table the Question’s parent catalog item creates Once catalog item is submitted, value in this Question will be copied over to the nominated Record field |
Copy display value | Boolean | No | Sets the display value, by default the internal value is set |
Process answer | Script |
| For complex rules, any business logic can be scripted in this field, with a result set in the answer variable. |
Replace answer | Boolean | No | Replace original answer with processed answer |
Question data - Default value | |||
Default from question | Choice |
| Pick from Questions associated with the same catalog item |
Default from function | Reference |
| Relationship query functions on Table defined as reference field |
Default from script | Script | let defaultStorage = "256GB";
if (questions.MyColour.hasChanged() && questions.MyColour.value() == "Black") {
defaultStorage = "512GB";
}
answer = defaultStorage; | Setting value on the catalog question with what the script returns. To access other catalog questions including itself, use the questions object. E.g. If question is called ABC, you can access it via questions.ABC The script will need to set a variable called answer and that will be used to set the question's value.
Some syntax notes: Say you had a field 'aaa': For scalars and references:
For multi references:
|
Always use default | Boolean |
| If set to Yes, the Default Script will run every time the field needs to recalculate (all other fields getting updated) as well as during form load. If set to No, the Default Script will run only during form load. |
Examples
Creating an attachment field
You need to use a a Question Datatype of “Multiple reference” referencing the “Attachment” table and the Question to the appropriate Attachment field on the Catalog item’s target record table. Below is a sample if you are mapping to the ITSMRequest table’s Attachments field:
The Datatype “Multiple reference” allows you to attach multiple files. You may use “Reference” if you only want to allow users to attach a single file into it.
Related content
Servicely Documentation