Servicely Configuration
Record Generation
4 min
the record generator functionality provides the ability to generate a sequential group of records that are related to a parent record based on a condition this can be used to set up specific work records that when completed will trigger other work record(s) to be created, whilst populating a parent’s field upon completion whilst the record generator is associated to a record, the generated records are generated from the details set up in the associated record templates it should be noted that only one record generator can be running against a record at once record generator field type example notes / description name string hr case employee on boarding this is the name of the record generator used to identity a record generator active boolean true highlights whether a record generator can run or not table table hr case the table that the record generator's condition will run on note that the record's generated do not have to be of the same table currently only entities extended from work are supported priority order integer 1 the priority order highlights what record generator will run if multiple have had their condition met at the same time the lowest priority order will run in that situation condition condition builder classification is new employee > onboard request the condition as to when a record generator will run if both this field and the advanced condition field have been entered, both fields need to pass the condition otherwise only the populated field needs to advanced condition script //no scripted condition needed, just the classification the condition that is required associate a record generator with a record if the condition is scripted it requires an answer variable to be true or false within the script you have access to the current record it is executing on via "current" if both the advanced condition and condition field have been entered, both fields need to be true on execution script script this is the script that allows you to set any other field when the record generator is associated with a record within the script you have access to the current record it is executing on via "current" do not update the record within the script, as it will automatically update if populated this will populate the record that is triggering the record generator record templates related list \[record template table] internal services provisioning request it hardware read company policies the record templates that will generate the records as detailed within them when the record generator run record templates field type example notes / description record generator reference \[record generator table] hr case employee on boarding the associated record generator that will cause this record template to generate a record short description string request it hardware this is the short description that is used when a short description field exists on the target record it can be overwritten by the on creation script when required assignment group reference \[group table must be selectable and accessible from the record template's table] it service desk this is the assignment group that is used when an assignment group field exists on the target record it can be overwritten by the on creation script when required active boolean true determines whether or not the record template will generate a record or not table table itsm request this is the record that will be created when required it does not have to be of the same table as the record generator related field choice \[fields on associated table] parent this is the field on the table selected that associates the record this template generates, with the record that the associated record generator is related to for example; the parent incident field for incident tasks can be used wait for reference to many \[record template table] internal services provisioning these are the record templates associated with the record generator that need to be completed first for this template to generate a record if there are multiple records here, they all need to complete prior to this record template is able to generate a record on creation script script this is the script that runs when a record is created from this record template within the script you have access to the current record it is executing on via "current" do not update the record within the script, as it will automatically update if this field has been populated closure flag field choice \[fields on associated table] closed this is the boolean on the record this template generates that highlights when it has been closed (to trigger the next record template records) field to update on completion choice \[fields on associated table] client journal if this has been populated, this is the field that will be updated with the content of the field below on the record that the generator is associated with content of completion update script this is the content that will be entered into the record that the generator is associated with, if the field is populated within the script you have access to the current record (that this template generated) it is executing on via "current" records waiting for this template related list \[record template table] read company policies these are the record templates that will generate records, once the record that this record template has created has been closed how record generators operate when record generators have been set up for a table, there is a specific run process in terms of how it runs this section details what occurs and what steps take place to generate the associated records when a record has been updated, it will first determine if the record generator field has been populated if it hasn’t, it will check if there are any active record generators associated with the table that the record is updated that meet both the condition and advanced condition if there is one (or multiple), it will pick the one with the lowest priority order and populate the record generator field for that record once done and there is an on execution script on the associated record generator, the on execution script will run against the record that started the record generator if it is the first time that the record generator is running against that associated record, it will generate a record for every associated active record template that has no “wait for” record template populated for each record template that is being generated, the short description, assignment group, related field and the record template field will be populated on the generated record in addition to this, the on creation script on the record template will be run on the associated record it generates once the required record templates have been run, the record generator will not run, until a record generated from a record template has been closed once a record from a record template has been closed, it will populate the “field to update on completion” with the returned content from the “content of completion update” field on the record template that generated this record when this has been done, it will determine if there are any record templates that were waiting on this record to be completed, then begin those this process continues until all record’s have been closed it should be noted that once a record generator has been associated to a record, no others will