Create OLA using transform map

Debasis Pati
Tera Guru

Hello Team,

I have an excel sheet of group record data.I want to create one one individual ola record for each group .
My group data is as follows

NameTypeLine / Vendor ManagerDescriptionGroup emailVendors
FITincident, request, problem, changeAcerFIT support groupfitdesk@test.com 
IT SERVICE DESKincident, request, problem, changeAdobe SystemsIT SERVICE DESK groupitservice-desk@test.com 


the below is my ola conditions how it should be created

TitleNameDuration TypeDurationSchedule sourceScheduleTimezone SourceTargetTypeTableStartPauseWhen to ResumeStopWhen to CancelRetroactive StartSet Start toRetroactive PauseSLA Breakdown Config (Assignment Group and Assign to)

 Resolution OLA

Team1-FulfillmentUser specified durationBreached on 'Due Date'SLA definition8-6 weekdaysThe caller's time zoneResolutionOLAsc_taskActive = true  State = Closed CompleteState = Closed Incomplete OR Closed SkippedYesCreatedN/ATRUE
AND Assignment group  = Team1
AND Assignment group.Vendor is Empty



Now instead of Team1 it should replace the group name for example "FIT" is my group's name.
also in condition also it should build active true assignment group is fit like that.

I want to use transform map and create bulk ola records.
what approach i should do to get his done.

@Ankur Bawiskar any suggestions?





1 ACCEPTED SOLUTION

@Debasis Pati 

correct it will pick the due_date field present on Task table

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

12 REPLIES 12

in my upload excel sheet we do not have all the fields we only have name and in target field we have logic only to set those fields as you have explained.

DebasisPati_0-1765353232160.png


what i should set without the source field match i can't save and can't create field maps.

@Debasis Pati 

then have field map only for name

then handle every other field in onBefore transform script and set the target field

something like this

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {

    // Add your code here
    var condition = 'active=true^assignment_group=b85d44954a3623120004689b2d5dd60a^EQ^';

    // if you know group sysId then use that or dot walk to name field

    //var condition = "active=true^assignment_group.name=FIT^EQ";
    target.setValue('start', condition);

})(source, map, log, target);

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hello @Ankur Bawiskar ,
i tried  the on before script and it works now but i am not able to set it should breached if due date passes .due date is a field i tried the duration type with different options but it is not working.

TitleNameDuration TypeDurationSchedule sourceScheduleTimezone SourceTargetTypeTableStartPauseWhen to ResumeStop
 Resolution OLAInternalTeam1-FulfillmentUser specified durationBreached on 'Due Date'SLA definition8-6 weekdaysThe caller's time zoneResolutionOLAsc_taskActive = true  State = Closed Complete
AND Assignment group  = InternalTeam1
AND Assignment group.Vendor is Empty


I do not think i can provide schedule duration according to the above.

@Debasis Pati 

Glad to know my approach worked.

you can set duration_type with this sysId in onBefore transform script

target.duration_type = '5d3bf3e5eb5322002a7a666cd206fe8e';

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar ,
I need to set the duration type to user sepecified duration and duration to the field that is breached date it means it should get breached on due date field present on sc_task field.

Duration TypeDurationSchedule sourceScheduleTimezone Source
User specified durationBreached on 'Due Date'SLA definition8-6 weekdaysThe caller's time zone