[{"data":1,"prerenderedAt":1025},["ShallowReactive",2],{"guide:en:admin/automations":3},{"id":4,"title":5,"body":6,"description":1017,"extension":1018,"meta":1019,"navigation":1020,"path":1021,"seo":1022,"stem":1023,"__hash__":1024},"guide_en/en/user/admin/automations.md","Automations",{"type":7,"value":8,"toc":991},"minimark",[9,13,17,22,33,36,40,45,95,101,117,121,183,187,259,263,295,299,391,395,437,441,473,477,539,543,585,589,592,618,621,625,628,722,726,731,783,785,788,792,812,816,869,873,876,895,899,906,923,926,930,936,942,948,954,958],[10,11,5],"h1",{"id":12},"automations",[14,15,16],"p",{},"Automations let you define rules that fire automatically when specific events occur — without manual intervention. They are configured once by an admin and then run continuously in the background.",[18,19,21],"h2",{"id":20},"how-automations-work","How Automations Work",[23,24,29],"pre",{"className":25,"code":27,"language":28},[26],"language-text","Event occurs in Aptli\n       ↓\nSystem checks all automations for matching trigger\n       ↓\nConditions evaluated (if any)\n       ↓\nAction(s) executed\n","text",[30,31,27],"code",{"__ignoreMap":32},"",[14,34,35],{},"Automations use an event-driven model. The system does not poll or run on a schedule (for scheduled tasks like nightly alerts, see Work Order notifications below); instead, automations react instantly when the triggering event fires.",[18,37,39],{"id":38},"trigger-types","Trigger Types",[41,42,44],"h3",{"id":43},"gis-import-events","GIS Import Events",[46,47,48,61],"table",{},[49,50,51],"thead",{},[52,53,54,58],"tr",{},[55,56,57],"th",{},"Trigger",[55,59,60],{},"When It Fires",[62,63,64,75,85],"tbody",{},[52,65,66,72],{},[67,68,69],"td",{},[30,70,71],{},"geo.import.created",[67,73,74],{},"A file upload is accepted and the import job is queued",[52,76,77,82],{},[67,78,79],{},[30,80,81],{},"geo.import.completed",[67,83,84],{},"The background conversion finishes; features are ready to review",[52,86,87,92],{},[67,88,89],{},[30,90,91],{},"geo.import.failed",[67,93,94],{},"The file conversion fails (error, corrupt file, etc.)",[14,96,97],{},[98,99,100],"strong",{},"Context available:",[102,103,104,111],"ul",{},[105,106,107,110],"li",{},[30,108,109],{},"job"," — the import job record (id, filename, fileType, featureCount, status)",[105,112,113,116],{},[30,114,115],{},"actor"," — the user who uploaded the file (null for system-initiated imports)",[41,118,120],{"id":119},"work-order-events","Work Order Events",[46,122,123,131],{},[49,124,125],{},[52,126,127,129],{},[55,128,57],{},[55,130,60],{},[62,132,133,143,153,163,173],{},[52,134,135,140],{},[67,136,137],{},[30,138,139],{},"workorder.created",[67,141,142],{},"A new work order is saved",[52,144,145,150],{},[67,146,147],{},[30,148,149],{},"assignment.statusChanged",[67,151,152],{},"Status transitions (pending → in-progress, completed, cancelled)",[52,154,155,160],{},[67,156,157],{},[30,158,159],{},"assignment.cancelled",[67,161,162],{},"A work order is cancelled",[52,164,165,170],{},[67,166,167],{},[30,168,169],{},"assignment.reassigned",[67,171,172],{},"Assigned users change",[52,174,175,180],{},[67,176,177],{},[30,178,179],{},"assignment.pickupCompleted",[67,181,182],{},"A QR pickup scan completes the inventory transfer",[41,184,186],{"id":185},"report-and-validation-events","Report and Validation Events",[46,188,189,197],{},[49,190,191],{},[52,192,193,195],{},[55,194,57],{},[55,196,60],{},[62,198,199,209,219,229,239,249],{},[52,200,201,206],{},[67,202,203],{},[30,204,205],{},"report.created",[67,207,208],{},"A work report is created",[52,210,211,216],{},[67,212,213],{},[30,214,215],{},"report.submitted",[67,217,218],{},"A report is submitted for validation",[52,220,221,226],{},[67,222,223],{},[30,224,225],{},"report.validated",[67,227,228],{},"A report passes validation",[52,230,231,236],{},[67,232,233],{},[30,234,235],{},"report.rejected",[67,237,238],{},"A report is rejected by a validator",[52,240,241,246],{},[67,242,243],{},[30,244,245],{},"validation.created",[67,247,248],{},"A validation record is created",[52,250,251,256],{},[67,252,253],{},[30,254,255],{},"validation.statusChanged",[67,257,258],{},"A validation status transitions",[41,260,262],{"id":261},"project-and-task-events","Project and Task Events",[46,264,265,273],{},[49,266,267],{},[52,268,269,271],{},[55,270,57],{},[55,272,60],{},[62,274,275,285],{},[52,276,277,282],{},[67,278,279],{},[30,280,281],{},"project.created",[67,283,284],{},"A new project is created",[52,286,287,292],{},[67,288,289],{},[30,290,291],{},"task.created",[67,293,294],{},"A new task is created",[41,296,298],{"id":297},"inventory-events","Inventory Events",[46,300,301,309],{},[49,302,303],{},[52,304,305,307],{},[55,306,57],{},[55,308,60],{},[62,310,311,321,331,341,351,361,371,381],{},[52,312,313,318],{},[67,314,315],{},[30,316,317],{},"inventory.created",[67,319,320],{},"New inventory is received",[52,322,323,328],{},[67,324,325],{},[30,326,327],{},"inventory.updated",[67,329,330],{},"Existing inventory is modified",[52,332,333,338],{},[67,334,335],{},[30,336,337],{},"stock.batchReceived",[67,339,340],{},"A batch receipt of inventory arrives",[52,342,343,348],{},[67,344,345],{},[30,346,347],{},"stock.adjusted",[67,349,350],{},"A manual stock adjustment is made",[52,352,353,358],{},[67,354,355],{},[30,356,357],{},"stock.converted",[67,359,360],{},"A unit conversion is applied",[52,362,363,368],{},[67,364,365],{},[30,366,367],{},"stock.transferred",[67,369,370],{},"Stock moves between sites",[52,372,373,378],{},[67,374,375],{},[30,376,377],{},"stock.low",[67,379,380],{},"Stock falls below minimum level",[52,382,383,388],{},[67,384,385],{},[30,386,387],{},"stock.staged.allocated",[67,389,390],{},"Staged inventory is allocated to a resource",[41,392,394],{"id":393},"user-events","User Events",[46,396,397,405],{},[49,398,399],{},[52,400,401,403],{},[55,402,57],{},[55,404,60],{},[62,406,407,417,427],{},[52,408,409,414],{},[67,410,411],{},[30,412,413],{},"user.invited",[67,415,416],{},"A new user invitation is sent",[52,418,419,424],{},[67,420,421],{},[30,422,423],{},"user.oauthLinked",[67,425,426],{},"A user links an OAuth provider",[52,428,429,434],{},[67,430,431],{},[30,432,433],{},"user.deactivated",[67,435,436],{},"A user account is deactivated",[41,438,440],{"id":439},"help-request-events","Help Request Events",[46,442,443,451],{},[49,444,445],{},[52,446,447,449],{},[55,448,57],{},[55,450,60],{},[62,452,453,463],{},[52,454,455,460],{},[67,456,457],{},[30,458,459],{},"helpRequest.created",[67,461,462],{},"A new help request is submitted",[52,464,465,470],{},[67,466,467],{},[30,468,469],{},"helpRequest.statusChanged",[67,471,472],{},"A help request status changes",[41,474,476],{"id":475},"version-and-file-events","Version and File Events",[46,478,479,487],{},[49,480,481],{},[52,482,483,485],{},[55,484,57],{},[55,486,60],{},[62,488,489,499,509,519,529],{},[52,490,491,496],{},[67,492,493],{},[30,494,495],{},"version.submittedForReview",[67,497,498],{},"A GIS version is submitted for admin review",[52,500,501,506],{},[67,502,503],{},[30,504,505],{},"version.committed",[67,507,508],{},"A GIS version is committed (goes live)",[52,510,511,516],{},[67,512,513],{},[30,514,515],{},"file.uploaded",[67,517,518],{},"A file attachment is uploaded",[52,520,521,526],{},[67,522,523],{},[30,524,525],{},"file.quarantine_failed",[67,527,528],{},"A file fails the security scan",[52,530,531,536],{},[67,532,533],{},[30,534,535],{},"file.deleted",[67,537,538],{},"A file attachment is deleted",[41,540,542],{"id":541},"scheduled-triggers","Scheduled Triggers",[46,544,545,553],{},[49,546,547],{},[52,548,549,551],{},[55,550,57],{},[55,552,60],{},[62,554,555,565,575],{},[52,556,557,562],{},[67,558,559],{},[30,560,561],{},"schedule.daily",[67,563,564],{},"Once per day",[52,566,567,572],{},[67,568,569],{},[30,570,571],{},"schedule.weekly",[67,573,574],{},"Once per week",[52,576,577,582],{},[67,578,579],{},[30,580,581],{},"schedule.monthly",[67,583,584],{},"Once per month",[18,586,588],{"id":587},"conditions","Conditions",[14,590,591],{},"Conditions narrow when an automation fires. They are evaluated against the event context. Examples:",[102,593,594,600,606,612],{},[105,595,596,599],{},[30,597,598],{},"job.fileType == 'gdb'"," — only fire for GDB imports",[105,601,602,605],{},[30,603,604],{},"workOrder.status == 'completed'"," — only fire on completion, not cancellation",[105,607,608,611],{},[30,609,610],{},"actor.email endsWith '@myorg.com'"," — only fire for internal users",[105,613,614,617],{},[30,615,616],{},"job.featureCount > 1000"," — only fire for large imports",[14,619,620],{},"Conditions use a simple expression language. Multiple conditions are ANDed together (all must pass).",[18,622,624],{"id":623},"actions","Actions",[14,626,627],{},"The following action types are available when building automations:",[46,629,630,640],{},[49,631,632],{},[52,633,634,637],{},[55,635,636],{},"Action",[55,638,639],{},"Description",[62,641,642,652,662,672,682,692,702,712],{},[52,643,644,649],{},[67,645,646],{},[30,647,648],{},"send_notification",[67,650,651],{},"Send a push notification to a user or group",[52,653,654,659],{},[67,655,656],{},[30,657,658],{},"send_email",[67,660,661],{},"Send an email to a user or group",[52,663,664,669],{},[67,665,666],{},[30,667,668],{},"call_webhook",[67,670,671],{},"POST a JSON payload to an external HTTPS URL",[52,673,674,679],{},[67,675,676],{},[30,677,678],{},"create_workorder",[67,680,681],{},"Create a new work order",[52,683,684,689],{},[67,685,686],{},[30,687,688],{},"create_assignment",[67,690,691],{},"Create a new assignment",[52,693,694,699],{},[67,695,696],{},[30,697,698],{},"create_task",[67,700,701],{},"Create a new task",[52,703,704,709],{},[67,705,706],{},[30,707,708],{},"update_field",[67,710,711],{},"Update a field on the triggering record",[52,713,714,719],{},[67,715,716],{},[30,717,718],{},"run_calculation",[67,720,721],{},"Execute a configured calculation rule",[41,723,725],{"id":724},"send_notification-send_email","send_notification / send_email",[14,727,728],{},[98,729,730],{},"Parameters:",[102,732,733,747,753,767],{},[105,734,735,738,739,742,743,746],{},[30,736,737],{},"to"," — user ID, role name, or ",[30,740,741],{},"creator"," / ",[30,744,745],{},"assignedTo"," keywords",[105,748,749,752],{},[30,750,751],{},"subject"," — email subject line (supports template variables)",[105,754,755,758,759,762,763,766],{},[30,756,757],{},"body"," — message body (template variables: ",[30,760,761],{},"{{job.filename}}",", ",[30,764,765],{},"{{workOrder.name}}",", etc.)",[105,768,769,772,773,762,776,779,780],{},[30,770,771],{},"channel"," — ",[30,774,775],{},"email",[30,777,778],{},"push",", or ",[30,781,782],{},"both",[41,784,668],{"id":668},[14,786,787],{},"POST a JSON payload to an external URL.",[14,789,790],{},[98,791,730],{},[102,793,794,800,806],{},[105,795,796,799],{},[30,797,798],{},"url"," — HTTPS endpoint to call",[105,801,802,805],{},[30,803,804],{},"headers"," — optional custom headers (e.g., Authorization)",[105,807,808,811],{},[30,809,810],{},"includeContext"," — whether to include the full event context in the payload",[18,813,815],{"id":814},"creating-an-automation","Creating an Automation",[817,818,819,825,831,857,864],"ol",{},[105,820,821,822],{},"Navigate to ",[98,823,824],{},"Admin → Automations",[105,826,827,828],{},"Click ",[98,829,830],{},"New Automation",[105,832,833,834],{},"Fill in:\n",[102,835,836,842,847,852],{},[105,837,838,841],{},[98,839,840],{},"Name"," — descriptive label",[105,843,844,846],{},[98,845,57],{}," — select from the trigger type list",[105,848,849,851],{},[98,850,588],{}," (optional) — add filter expressions",[105,853,854,856],{},[98,855,624],{}," — add one or more actions",[105,858,859,860,863],{},"Set ",[98,861,862],{},"Active"," toggle to enable",[105,865,827,866],{},[98,867,868],{},"Save",[18,870,872],{"id":871},"testing-an-automation","Testing an Automation",[14,874,875],{},"From the automation detail page:",[817,877,878,883,886,892],{},[105,879,827,880],{},[98,881,882],{},"Test Run",[105,884,885],{},"Select a sample event from recent activity (or paste a JSON context manually)",[105,887,827,888,891],{},[98,889,890],{},"Run"," — the system evaluates conditions and executes actions in a dry-run mode (actions are logged but not actually sent / called)",[105,893,894],{},"Review the test output for errors",[18,896,898],{"id":897},"monitoring","Monitoring",[14,900,901,902,905],{},"The ",[98,903,904],{},"Automation History"," tab shows:",[102,907,908,911,914,917,920],{},[105,909,910],{},"Last 50 executions",[105,912,913],{},"Trigger event that fired it",[105,915,916],{},"Conditions result (pass / skip)",[105,918,919],{},"Action results (success / error per action)",[105,921,922],{},"Timestamp and duration",[14,924,925],{},"Failed actions appear in red. Click a row to see the full error.",[18,927,929],{"id":928},"best-practices","Best Practices",[14,931,932,935],{},[98,933,934],{},"Start with notifications."," The most common use case is sending an alert when a job completes or fails. Test this before building complex chains.",[14,937,938,941],{},[98,939,940],{},"Use conditions liberally."," An automation that fires on every event is noisy. Add conditions to target only the situations that matter.",[14,943,944,947],{},[98,945,946],{},"Keep actions idempotent."," If an automation fails partway and retries, the actions should be safe to run twice (e.g., send-email is idempotent because a duplicate notification is at worst annoying, not harmful).",[14,949,950,953],{},[98,951,952],{},"Avoid long chains."," Automations that trigger other automations are powerful but hard to debug. Document the chain clearly in the automation names and descriptions.",[18,955,957],{"id":956},"permissions","Permissions",[46,959,960,969],{},[49,961,962],{},[52,963,964,966],{},[55,965,636],{},[55,967,968],{},"Required Right",[62,970,971,981],{},[52,972,973,976],{},[67,974,975],{},"View automations",[67,977,978],{},[30,979,980],{},"automationsView",[52,982,983,986],{},[67,984,985],{},"Create / edit automations",[67,987,988],{},[30,989,990],{},"automationsModify",{"title":32,"searchDepth":992,"depth":992,"links":993},2,[994,995,1007,1008,1012,1013,1014,1015,1016],{"id":20,"depth":992,"text":21},{"id":38,"depth":992,"text":39,"children":996},[997,999,1000,1001,1002,1003,1004,1005,1006],{"id":43,"depth":998,"text":44},3,{"id":119,"depth":998,"text":120},{"id":185,"depth":998,"text":186},{"id":261,"depth":998,"text":262},{"id":297,"depth":998,"text":298},{"id":393,"depth":998,"text":394},{"id":439,"depth":998,"text":440},{"id":475,"depth":998,"text":476},{"id":541,"depth":998,"text":542},{"id":587,"depth":992,"text":588},{"id":623,"depth":992,"text":624,"children":1009},[1010,1011],{"id":724,"depth":998,"text":725},{"id":668,"depth":998,"text":668},{"id":814,"depth":992,"text":815},{"id":871,"depth":992,"text":872},{"id":897,"depth":992,"text":898},{"id":928,"depth":992,"text":929},{"id":956,"depth":992,"text":957},"Trigger-based rules that fire actions automatically when events occur in the system","md",{},true,"/en/user/admin/automations",{"title":5,"description":1017},"en/user/admin/automations","wetFXLhPjTuG6D_wcA6lwh5lIjb3B_tq4FraBjLBQcI",1776295546642]