Custom Module SetSLAByDFValueConfig
This module is responsible for adding an SLA to the ticket according to the value of 2 dynamic fields present in the ticket. Here we will call them state and city.
Running a script to map the config used for the relation
The generic attendant uses the parameters of the "CustomModuleGenericAgent::SetSLAByDFValueConfig::DFRelations" config. To map it automatically, you can run a script that will read a csv file and map it automatically. For that create a csv file, as in the example:
Estado;Cidade;SLA
RO;Alta Floresta D´oeste;5 DIAS
AC;Acrelândia;5 DIAS
SP;Araraquara;Teste 30min
And then run the script as follows:
perl otrs.SetSLAByDFValueCSV.pl --path=/opt/otrs/Teste.csv
Then the configuration will be filled
Run
Create a generic attendant with the event that you want to run.
Custom module:
Module => Kernel::System::GenericAgent::SetSLAByDFValueConfig::SetSLAByDFValueConfig
Param Keys:
Estado => Dynamic field name matches
Cidade => Dynamic field name matches
The generic attendant will match the information present in the "test" config to set the SLA in the ticket. Example: