Summary
Select the release feature from the table below to be taken directly to that section of the release note.
Feature 1 | Feature 2 | Feature 3 |
Admin functionality has been added to allow the creation of organisation-specific 'custom fields' for Ingredients |
A new endpoint has been added to allow the population of custom fields via the API |
|
Release date for all features: September 21st 2022
Ingredients: Custom Fields
- Enabled by Default? - No
- Set up by customer Admin? - Yes - for enabling user group permissions to create, view and edit custom fields
- Enable via Support ticket? - Yes - for two steps: for enabling new 'custom field' permission and field visibility in User Groups
- Affects configuration or data? - No
- Roles Affected: - Admin users/Ingredient data managers
What's Changing?
Admin functionality has been added to allow the creation of organisation-specific 'custom fields' for Ingredients.
Reason for the Change
To provide a wider range of options when classifying Ingredients.
Customers Affected
Optional, available to all customers.
Release Note Info/Steps
Configuration Steps - Overview
- Contact the Fourth support team to request for the new 'Allow custom fields management' permission to be made available
- Then enable Allow custom fields management for the relevant User Group(s), via admin > User Groups > Permissions - see Fig.1
- Change to a User Group (via the Home tab) that has Custom Fields permission enabled and again go to the admin tab
- Select Custom Fields from the drop-down and then create custom fields as required
- Contact the Fourth support team again to make the new fields available to organisation User Groups
- Enable permission to View and/or Edit custom fields for relevant User Groups
- Make new custom fields Visible as required to relevant User Groups - Fig.5 & 6
Fig.1 - User Group, Admin permission to manage custom fields
Fig.2 - Custom Fields available from the admin functions list
Creating Custom Field Values
When creating new custom fields, the following values can be used. Also see Fig.3 below.
Field name | Usage | Validation/Possible Values/Examples |
Name | Property name in API requests | Text string. No special characters or spaces allowed |
Display Name | Field name displayed in UI | Text string |
Type | Determines if the new custom field will be a text field or a field with list options | Possible values are: Text or List. Text fields can be configured (optional) with 'min/max' values so could be numeric fields with validation enforced for min/max values |
Is Active | Determines if the custom field is visible to user groups. Once the field is enabled for a user group, the field will be displayed on the Ingredient > Custom Field tab. 'In use' fields cannot be deleted but can be hidden by being made 'inactive' |
Ticked = 'active' Unticked = 'inactive' |
Add List Options | Will display if the field type is 'List' - see Fig.3 | Example of List: Farming Method |
Option Text | Name that the list 'option' will display in the UI | Example of Farming Method 'options': Organic, Traditional |
Option Value | Property name of the list option in API requests |
Fig.3 - Custom fields can be 'List' type or 'Text' type. Lists type fields have 'List Options' which will create a drop-down list in the Ingredients screen.
Once a custom field has been created by an organisation, it must be configured in global database settings for the field to be available to the organisation's user groups (Fourth Support team can help with this - see step 5 above). Configuration options include: Visible to food items/non-food items, Mandatory, Min/Max Value, Max Length.
Fig.4 - After their creation, custom fields must be made 'available' to an organisation's user groups in Global Database Settings
After the custom fields have been enabled for an organisation (see above), permission to view and edit the custom fields can be enabled via User Group permissions, just as other ingredient fields are managed.
The new permissions are located within the Product Specification section of user group Permissions.
Fig.5 - Permission to 'View' and 'Edit' custom fields are located within the Product Specification section of user group permissions
Fig. 6 - Custom Field visibility is controlled within the Ingredient Fields configuration options of each user group
Fig.7 - Once created then enabled in global database settings and enabled in user groups, custom fields will display on a new Custom Fields tab within the main Ingredients screen. Lists type fields will have a drop-down list.
Fig. 8 - Usage of each custom field is displayed on Custom Field > Usage tab
Once a custom field is 'in use', it cannot be deleted. It can, however, be made 'inactive'.
Custom Fields: API
- Enabled by Default? - No
- Set up by customer Admin? - No
- Enable via Support ticket? - Yes
- Affects configuration or data? - No
- Roles Affected: - API users
What's Changing?
A new API request has been added to allow the population of ingredient custom field values.
Reason for the Change
For those customers using RME APIs, these new requests will allow the management of the new ingredient custom field values via the APIs.
Customers Affected
Optional, available to all customers.
Release Note Info/Steps
- Raise a request with Fourth's support team to arrange access to the APIs
- See developer.fourth.com for an overview of how to integrate with our APIs
POST/ingredientcustomfields
The purpose of this endpoint is to populate 'custom fields' for ingredients.
Custom fields can be defined as: text or list.
Parent and alternate ingredients can be updated via this endpoint.
Sample payload
[
{
"StarChefKey": "0030702",
"SupplierName": "Dairy",
"SupplierCode": "B365",
"CustomFieldName": "Farming_method",
"CustomFieldValue": "Organic"
}
]
Payload validation
- The custom field name is mandatory.
- The custom field name must match an existing custom field name.
List type custom field, additional validation
- The 'custom field value' in the payload will be matched on an existing 'option' for the 'custom field'.
- If the 'custom option value' in the payload does not match one of the existing options, an error should be generated.
API Enhancements
- Enabled by Default? - No (shelf life '0' is enabled by default)
- Set up by customer Admin? - No
- Enable via Support ticket? - Yes
- Affects configuration or data? - No
- Roles Affected: - API users
What's Changing?
- New API requests have been added to allow the retrieval and population of ingredient and recipe CO2 values
- For this request: api.starchef.net/v2/recipes/{guid}, if Shelf Life value = 0, include this '0' value in the response
Reason for the Change
For those customers using RME APIs, these new requests will allow the management of the new ingredient and recipe CO2 values via the APIs.
Increased support for customers using recipe 'shelf life' and for whom a shelf life of '0' is valid.
Customers Affected
Optional, available to all customers.
Release Note Info/Steps
- Raise a request with Fourth's support team to arrange access to the APIs
- See developer.fourth.com for an overview of how to integrate with our APIs
API: Ingredient CO2 values
GET /ingredientco2
Sample response
[
{
"StarChefKey": "0030702",
"IngredientGuid": "2B05F7E8-D60E-4949-916F-389BC3CEA56B",
"IngredientName": "Fresh Orange",
"IngredientCO2Value": "55.5"
}
]
Filters
lastModifiedAfter
groupGuid
productId (StarChef key)
guid (ingredient guid)
setType
POST /ingredientco2
Sample payload
[
{
"IngredientCO2Value": "55.5",
"SupplierName": "Dairy",
"SupplierCode": "B365",
"StarChefKey": "0030702"
}
]
API: Recipe CO2 values
GET /recipeco2
Sample response
[
{
"RecipeStarChefKey": "0030702",
"RecipeGuid": "6c3fec7d-97c9-48f8-b84e-13bb179b9fa6",
"RecipeName": "Roast Lamb Salad",
"RecipeCO2Value": "55.5",
"RecipeCO2Ranking": "Free text"
}
]
Filters
lastModifiedAfter
guid (recipe guid)
groupGuid
setType
POST /recipeco2
Sample payload
[
{
"RecipeStarChefKey": "0030702",
"RecipeCO2Value": "55.5",
"RecipeCO2Ranking": "Free text"
}
]
Additional Resources
August 23rd 2022, Release Note: RME | CO2 Ingredient and Recipe Values
Shelf Life Value of '0' Included in API Response
Release Note Info/Steps
No steps are required on the part of the customer.
Additional Resources
See developer.fourth.com for more details about integrating with the Fourth APIs
Comments
0 comments
Please sign in to leave a comment.