---
schema_version: "1"
id: ad0ce84a9e631426fd4d1a151bbba4061a0f679d42f70c03d1bc1fe6dd19c1be
title: Create the Subagent for Handling Service Resource Absences in the Legacy Agentforce Builder
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/fs_agentforce_autonomous_scheduling_resource_absence_topic.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.fs_agentforce_autonomous_scheduling_resource_absence_topic.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f1cfbab9ecdddc1d98cab85cd3904e204946d359c7be751c8ee046adffe36d68
description: Enter the required details for the subagent and the relevant agent actions.
products:
  - Field Service
release: "264"
---
# Create the Subagent for Handling Service Resource Absences in the Legacy Agentforce Builder

Enter the required details for the subagent and the relevant agent actions.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions with Field Service and Foundations. Also available with <strong>Einstein 1 Field Service</strong> Edition or <strong>Agentforce 1 Field Service</strong> Edition.</td></tr></tbody></table>

1. In Setup, find and select **Agentforce Assets**.
2. From the Subagents tab, click **New Subagent**.
3. Enter a name and API name.
4. For Classification Description, enter:
    
    Handles service resource absences. When a service resource reports that they are unavailable (for example, "I'm sick" or "I can't come to work today"), the system records the absence and attempts to automatically reschedule the appointments. For appointments that couldn’t be rescheduled, a Customer Outreach message is sent to the relevant customers for rebooking purposes.
5. For Scope, enter:
    
    Record Absence: Mark the service resource as unavailable using the Create Resource Absence action.
    
    Attempt Rescheduling: Try to reschedule the appointments using the Reschedule Service Appointments action.
    
    Get Remaining Appointments: Rerun the Create Resource Absence action to retrieve a definitive list of appointments that remain assigned to the service resource despite their absence.
    
    Customer Outreach: Trigger the Rebook and Notify for Field Service action for the remaining appointments.
6. Enter these instructions:
    
    Instruction 1: Create Absence & Identify Appointments
    
    Action: Execute the 'Create Resource Absence' action.
    
    Goal: Log the service resource as unavailable for the current day.
    
    Constraint: This action must return the list of today’s service appointments for this service resource.
    
    Instruction 2: Attempt to Reschedule Appointments
    
    Action: For every Service Appointment ID identified in Step 1, call the 'Reschedule Service Appointments' action. If the 'Reschedule Service Appointments' action returns a failure, continue to the next service appointment.
    
    Constraint: You are strictly forbidden from proceeding to Step 3 until the status of every appointment from Step 1 has been determined.
    
    Instruction 3: Final Schedule Verification
    
    Action: Execute the 'Create Resource Absence' action again.
    
    Goal: To get the service appointments of the service resources for today that can't be rescheduled.
    
    Logic: This second run will identify which service appointments are still assigned to the service resource because the 'Reschedule Service Appointments' action failed to find a new slot.
    
    Requirement: Capture a list of service appointments that are still assigned to the service resource, and call the 'Rebook and Notify for Field Service' action for this list of service appointments.
    
    Instruction 4: Closing & Reporting
    
    No matter what the result is, please reply to the service resource: "Thanks for letting me know. I'm logging your absence and rescheduling your appointments."
7. Add the actions that you created to the subagent:
    - Create Resource Absence
    - Reschedule Service Appointments
8. Add the Rebook And Notify for Field Service standard action to the subagent.