---
schema_version: "1"
id: 52f288b80e0285e1a117294ae0af7f32042e80596164b65a865de040684a734e
title: Set Up Agentforce for Guest Users
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/ls_agentforce_guest_users.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.ls_agentforce_guest_users.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b37b31268ea0b89d78fdeaf47a50fa7e78ef29cab24d17c060a4c79d4f5e8570
description: By default, the verification subagent verifies emails for users in your org as contacts or users. To enable Agentforce for users that aren't in your org (guest users), map new variables to agent actions and update the flows that the agent uses.
products:
  - Scheduler
  - Salesforce Platform
release: "264"
---
# Set Up Agentforce for Guest Users

By default, the verification subagent verifies emails for users in your org as contacts or users. To enable Agentforce for users that aren't in your org (guest users), map new variables to agent actions and update the flows that the agent uses.

### 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: <strong>Lightning Experience</strong></td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions with Agentforce enabled.</td></tr></tbody></table>

1. Edit your agent and add custom variables.
    1. From the Agentforce Agents Setup page, open your agent in Agentforce Builder. If your agent is active, deactivate it.
    2. Create a custom variable called Customer ID OR EMAIL. You will later map this variable so that the agent can use the customer ID or their email for verification.
    3. Create another custom variable called verifiedCustomerID.
2. Edit the Email with Verification Code action to create and map variables.
    1. From the Agentforce Agents Setup page, open your agent in Agentforce Builder. If your agent is active, deactivate it.
    2. From the left sidebar, select **Subagents**. Then select the subagent that includes the action output that you want to map to a variable.
    3. On the **This Subagent’s Actions** tab, select the action.
    4. [Create a new custom variable for the agent.](https://help.salesforce.com/s/articleView?id=ai.agent_variables_create.htm&language=en_US)
    5. In the Customer ID Instructions section, update Map to Variable to Customer ID or EMAIL
3. Map variables in the action
    1. On the **This Subagent’s Actions** tab, select the **Send Email with Verification Code** action.
    2. In the Customer ID Instructions section, update the Map to Variable field to the **Customer ID or EMAIL** variable.
    3. Repeat these steps for the following actions and their instructions:
        
        Verify Customer Agent: Customer ID instructions
        
        Create and Schedule Appointment for Scheduler: verifiedCustomerID
4. Open and edit the flow for the Send Email with Verification Code agent action.
    1. From the Agentforce Agents Setup page, open your agent in Agentforce Builder. If your agent is active, deactivate it.
    2. From the left sidebar, select **Subagents**. Then select the subagent that includes the action output that you want to map to a variable.
    3. On the **This Subagent’s Actions** tab, select the action.
    4. In the Reference Action section, click the **Open Reference Action** icon for Send Email with Verification Code.
    5. Update the flow as shown in this image.
        
        ![An autolaunched Salesforce flow that validates an email, checks for a lead in Salesforce, and generates a verification code.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_verification_flow.jpg)

Now, when a guest user schedules an appointment, they're asked for an email to verify their identity. Once they verify their identity with an OTP a guest user is now a verified customer. To book appointments, guest users are also asked for their first name, last name, and company to create a related Lead record.