Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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?





4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Debasis Pati 

So you want to change the condition at runtime? I think you may need to write a transform script for that. But why not just make the change in Excel and upload it instead?”

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@Debasis Pati 

in condition field you can give encoded query while mapping the field

what did you start and where are you stuck?

for which field map your transform map is failing?

💡 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

No i haven't started how to approch this first i should create a transform map and then load data and write script in transform map scripts?

 

@Debasis Pati 

correct while you use field map, you can use the field map script and then manipulate the incoming data from excel and then return the final condition

like this

AnkurBawiskar_0-1765349669102.png

 

-> For setting target field condition, create a dummy sla/ola and give your condition

AnkurBawiskar_1-1765349816080.png

-> then go in XML of that record and grab the condition

AnkurBawiskar_2-1765349872141.png

-> then copy that condition and use in your field map script

answer = (function transformEntry(source) {

    // 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";
    return condition;

})(source);

AnkurBawiskar_3-1765349944089.png

 

I believe I shared all the details and you can take it from here based on your developer skills and customer requirement.

💡 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