Skip to main content

Return to TX Community

Liaison

Salesforce FAQ Agent Setup Guide

Overview

This guide covers only the FAQ agent configuration and a single end-to-end flow that creates a Contact, an Inquiry, and, optionally, a follow-up Task with transcript context. It does not cover application-intent routing, application initiation setup, or a separate inquiry-enrichment build.  

This version provides a build guide for the agent, the FAQ subagent, the action configuration, and the supporting flow pattern. You must adjust field, object, and label names to fit your environment.

Build Sequence

Step

Description

1 Create an Agentforce Data Library (if not already created)
2 Create an Agentforce Service Agent Admissions Agent (if not already created)
3 Create the FAQ subagent.
4 Add the classification description and scope.
5 Add the subagent instructions.
6 Add the knowledge-answering action or capability used by the subagent.
7 Build and activate the supporting flow that the action will use.
8 Create the Create Contact and Inquiry agent action.
9 Test the End-to-End Agent Behavior

Step 1: Create an Agentforce Data Library

Create an Agentforce Data Library to define which knowledge articles the agent can access. Data Libraries based on Knowledge require a configured Knowledge base. For steps on creating Knowledge articles and Data Categories, see Set Up Your Knowledge Base (Lightning Knowledge Basics).

  1. In Settings, navigate to Agentforce Data Library.
  2. Create a new library: 
    1. Data Type: Knowledge
    2. Data Space: Default 
  3. In Field Settings: Configure the identifying and Content Fields the agent should leverage to respond with knowledge.
  4. In Knowledge Settings: (Optional) Configure if the agent should use only public knowledge articles and any data category filters the agent should be limited to. 

Step 2: Create an Agentforce Service Agent Admissions Agent 

Use a client-facing topic label that clearly describes the purpose, such as [University Name Admissions Agent]. The exact label can be adjusted to fit your naming conventions.

  1. From Setup > Agentforce Agents > New Agent.
  2. Select Agentforce Service Agent.
  3. Remove all subagent topics except for General FAQ.
  4. Give your agent a name, description, role, and company information overview.
  5. Select your Data Library. If you have not yet created your Data Library, you can complete this step later.
  6. Create.

Step 3: Create the FAQ subagent

Create a new subagent for FAQ and pre-application discovery conversations. This subagent is intended for students who are asking questions about admissions, programs, transfer, deadlines, tuition, residency, campus life, events, or other pre-application topics.

Use a client-facing topic label that clearly describes the purpose, such as FAQ and Inquiry Support or Admissions FAQ. The exact label can be adjusted to fit your naming conventions.

Step 4: Add the classification description and scope

The classification description tells the agent when this subagent/topic should be used, based on what the end user is asking for. It’s usually 1–3 sentences that describe the kinds of requests that belong to this subagent, so the reasoning engine can choose the right subagent when multiple subagents are available.

Use the following classification description as the basis for the subagent setup:

Use this agent when the user is asking about admissions, programs, transfer, application information, deadlines, tuition, residency, campus life, events, or other pre-application questions and has not explicitly said they want to start, begin, apply, continue, resume, finish, or submit an application. Only use this agent for exploratory or pre-application conversations where the student is gathering information, sharing interest in programs or terms, or is willing to provide contact and inquiry details so you can help them learn more and stay connected.

Add the Subagent Scope

The scope defines the job boundaries for the agent: what the agent is allowed to do and what it must not do when working under this subagent.

Set the scope so the agent is responsible for the following work:

  • Answer general admissions, program, and campus questions using approved knowledge.
  • Collect and confirm core inquiry details, including first name, last name, email, program of interest, intended entry term, entry year, and student type, whenever the student shows clear interest.
  • Create or update the student’s Contact and Inquiry records.
  • After an inquiry exists, guide the student to a concrete next step, with a preference for a campus visit, tour, open house, or admissions event when that capability is configured.

If you do not plan to support event-related actions, the event language can be removed or adjusted without changing the rest of the subagent design.

Step 5: Add the subagent instructions

Add the instructions to the subagent so the agent follows the intended conversational pattern. The list below keeps the FAQ topic focused on what is needed for this specific flow.

Required subagent instructions

  1. Always answer the user’s explicit question first with approved knowledge.
  2. If no Contact and Inquiry records exist, ask for first name, last name, and email address by the second turn at the latest, after giving at least one helpful answer.
  3. Do not skip asking for the required contact details when the student shows interest.
  4. When first name, last name, and email address are available, invoke the Create Contact and Inquiry action before saying the student’s interest has been saved, recorded, or noted.
  5. Do not state that the student’s information has been saved, recorded, or personalized unless the action has completed successfully.
  6. After an inquiry exists, ask for additional information one field at a time in this order: program of interest, intended entry term, entry year, and student type.
  7. After confirming each new detail, briefly acknowledge it and ask for the next highest-priority missing field instead of ending the conversation with a generic closing.
  8. When factual admissions or program information is needed, use only approved knowledge and do not fabricate or speculate beyond verified content.
  9. If the user asks a vague or broad question, provide the best available general answer and then ask a targeted clarifying question that helps identify the program of interest, term, or student type.
  10. Treat escalation to a human as a last resort. Prefer to answer with approved knowledge, then ask a targeted next-step question.
  11. After answering an FAQ, do not end with a generic offer such as “Let me know if you need anything else.” Ask exactly one specific follow-up question that advances inquiry completion or event engagement.
  12. If the student expresses interest in a program area, first list the relevant programs from approved knowledge and then ask which specific program they are most interested in.
  13. If the student states a specific program, acknowledge the interest, capture the program of interest, and then ask for the next missing core inquiry field rather than ending the conversation. 
  14. Once the first name, last name, and email are known, and the student has shown interest in studying at the institution, prioritize creating the Contact and Inquiry before continuing open-ended Q&A. 
  15. After confirming the inquiry has been created or updated, offer a concrete next step instead of a generic closing. 
  16. Ask only one follow-up question at a time, and do not repeat questions for details the student has already provided. 
  17. Only suggest follow-up options that you can actually support with knowledge or configured actions. If detailed program-level information or specific event data is not available, briefly explain the limitation and offer one clear next step (e.g., visiting a program webpage or contacting admissions) rather than listing multiple unsupported follow-up topics.

Step 6: Add the knowledge-answering action or capability used by the subagent

The subagent includes an action labeled answer questions with knowledge. Configure the subagent so the agent can answer admissions, program, and campus questions using approved knowledge articles before moving into inquiry collection. 

If you did not connect the Agentforce Data Library to your agent in the previous steps, you need to add that before the agent can respond to questions with knowledge.

  1. In the builder interface, navigate to the Data tab 
  2. Select your Agentforce Data Library
  3. Configure Library Field and Knowledge settings 

During testing, verify that common questions about programs, deadlines, tuition, admissions, and campus life return approved answers and that the topic then moves naturally into inquiry detail collection (Name and Email) when appropriate. 

Step 7: Build and activate the supporting flow that the action will use

What you’re Building

You are building an Autolaunched Flow (no trigger) that:

  1. Receives inputs from the Agent Action (first name, last name, email, etc.).
  2. Looks for an existing Contact by name and email.
  3. Creates a Contact if needed.
  4. Creates an Inquiry linked to the Contact and includes the conversation transcript.
  5. Optionally creates a follow-up task.
  6. Returns IDs, success flags, and user messages back to the agent.

You will later connect this flow to the agent action Agent_Create_Contact_Inquiry_Task_with_Transcript (or your renamed version).

  1. In Salesforce, go to Setup → Flow.
  2. Click New Flow.
  3. Choose Autolaunched Flow (no trigger).
  4. Click Create.

Rename the Flow

  • Flow Label: Create Contact Inquiry Task with Transcript
  • API Name: Create_Contact_Inquiry_Task_with_Transcript (or leave Salesforce’s default, but note it for the agent action).
  • Description: Use a concise but structured description to assist you as the Admin in understanding the technical and business purpose of the flow. You can also consider including the specific key actions and dependencies (optional).
    • Example: Used by Agentforce (add Name you plan to use for Agent) to look for an existing Contact, and when found or created, add an Inquiry record and, if needed, a follow-up Task. 

Resources

For any custom picklist value(s), navigate to the necessary objects and picklist fields to add these values first. For example, you should always have a designated Source field on both Inquiry and Contact to capture the Source. Consider whether you need a custom field(s) to capture the Messaging ID or Messaging Detail. Consider where you want to house this information (Inquiry or Task record) and create any necessary fields before starting. 

In the Toolbox > Manager tab, create variables that match the Agent Action inputs/outputs.

For each variable below:

  • Click New Resource.
  • Resource Type: Variable, Constant, Formula, or Text Template
  • Data Type: as listed. Typically, Text, but sometimes Boolean. 
  • Select Available for input for values the agent will send into the flow.
  • Select Available for output for values the flow will send back to the agent.

Constants

  • LastDataInputSource (e.g., AgentForce Update)

Variables (Single, Text, Available for Input)

  • Campus 
  • ChatID 
  • ConversationTranscript
  • Email 
  • FirstName 
  • FollowUpRequired (Boolean)
  • LastName 
  • Major 
  • messagingSessionId 
  • StudentType 
  • Term 
  • Year 

Variables (Single, Text, Available for Output)

  • ContactWasCreated
  • ErrorLocation 
  • ErrorMessage
  • outMessageMatch
  • outMessageNew
  • Success (Boolean)
  • UserMessage

Variables (Single, Text, Available for both Input and Output)

  • ContactID
  • InquiryID
  • OwnerID
  • TaskDescription
  • TaskID
  • TaskSubject

You may also want to create formulas, text templates for success and error messaging, and record variables for Contact, Inquiry, Messaging Session, and Task records. 

  • e.g., Text Template resource for Error Handling: ErrorLocationCreateContact --> ‘Create Contact.’
  • e.g., Text Template resource for Success Handling: SuccessMessageExisting --> ‘I found your Contact record and was able to update it successfully.’
  • e.g., Formula resource for Last Data Input Source including Chat ID --> ‘Agentforce Chat’ & ' ' & {!ChatID}

Build the Flow Elements End to End

Now you will add elements in logical order. Think of it as: Find Contact → Decide → Create/Update Contact → Create Inquiry → (optional Task) → Set outputs.  

Find an existing Contact

Create a Get Records element labeled Find Existing Contact with API name Find_Contact. 

Configure it as follows:

  • Filter logic: Custom Condition Logic is Met. e.g., 1 OR (1 AND 2 AND 3)
  • Condition 1: Email equals {!Email} (variable). 
  • Condition 2: First Name equals {!firstName}(variable). 
  • Condition 3: Last Name equals {!lastName}(variable). 
  • Sort by: LastModifiedDate, descending. 
  • Store only the first record. 
  • Store the fields needed for later use, including ID, FirstName, LastName, Email, and OwnerID. 
Decide whether a Contact exists

Add a decision element to the existing Contact path. Configure the following decision outcomes for:

Contact Record – Create

  • Within Resource, select ‘Contact from Find Existing Contact’ (Get Records element) 
  • Operator = ‘Is Blank’, and 
  • Value = ‘True’

Contact Record Exists – Update

  • Within Resource, select ‘Contact from Find Existing Contact’ (Get Records element) 
  • Operator = ‘Is Blank’, and 
  • Value = ‘False’

Default Outcome

  • End

If no matching Contact is found, follow the create path. If a matching Contact is found, follow the existing record update path. Ensure there is still a Default Outcome where the flow can end. Consider adding a Fault Path with an Assignment element. Within the Assignment, populate the variables of ‘ErrorLocation’ and ‘ErrorMessage’ with text templates of the values you want to pass to yourself as you test. E.g., ErrorLocation = ‘Find Contact Error’ and ErrorMessage = Running Flow Interview > Fault Message. 

Create the Contact Path

Add a Create Records element labeled Create Contact. The element should have the following field mappings at a minimum for the Contact record that is created: 

  • LastName = {!lastName}(variable).
  • FirstName = {!firstName}(variable).
  • Email = {!Email} (variable).
  • * Last Data Input Source = ‘AgentForce Update’ 

* Recommend creating this as a Constant resource to ensure ease of finding and updating later. 

  • *Source = ‘Agentforce’

* Recommend adding this or a similar value to the picklist for Source within the Inquiry, Contact, 
 or another object record you plan to update. 

Consider adding a Fault Path with an Assignment element. Within the Assignment, populate the variables of ‘ErrorLocation’ and ‘ErrorMessage’ with text templates of the values you want to pass to yourself as you test. E.g., ErrorLocation = ‘Create Contact Error’ and ErrorMessage = Running Flow Interview > Fault Message. If you would like to pass a message to the user via chat, you can also add a UserMessage. 

Following the Create Records element, add an Assignment element. 

  • ContactID (variable)= {!Create_Contact.Id}
  • OwnerID (variable) = {!Create_Contact.Owner.Id}
Update the Contact when a match exists

Add an Update Records element labeled Update Contact Found. Include this if the matched Contact should be refreshed or if related ownership/account values need to be maintained for later steps. 

Add an Assignment element and map the following: 

  • ContactID (variable) = {!Find_Contact.Id}
  • OwnerID (variable) = {!Find_Contact.Owner.Id}

Add an Update Records element labeled Update Contact Found. Map at least the following values: 

  • Filter Contact Records via 
    • ContactID = {!Find_Contact.Id}

Fields to Update (minimum):

  • *Last Data Input Source = ‘AgentForce Update’ 

* Recommend creating this as a Constant resource to ensure ease of finding and updating later. 

  •  *Source = ‘Agentforce’

* Recommend adding this or a similar value to the picklist for Source within the Inquiry, Contact, 
 or another object record you plan to update. 

Consider adding a Fault Path with an Assignment element. Within the Assignment, populate the variables of ‘ErrorLocation’ and ‘ErrorMessage’ with text templates of the values you want to pass to yourself as you test. E.g., ErrorLocation = Update Contact Error’ and ErrorMessage = Running Flow Interview > Fault Message. If you would like to pass a message to the user via chat, you can also add a UserMessage.

Retrieve transcript context

If you would like to link the Inquiry or Task record to the Agent’s chat transcript, you will need to follow these steps. Add a Get Records element labeled “Get Messaging Session” against the Messaging Session object. 

Filter Messaging Session records via the following configuration:

  • Id = {!messagingSessionId} (variable)
  • Store only the first record.
  • Automatically store all fields. 

Add a Decision element to determine whether a Messaging Session was found. 

Yes --> {!Get_Messaging_Session} Is Null False

Add an Action element and choose from the list ‘Get Conversation Transcript for Record’ or API Name ‘getConvTscpForRecord-getConvTscpForRecord’. 

  • Input values: 
    • RecordID = {!messagingSessionId} (variable)
    • Conversation Transcript = {!ConversationTranscript} (variable)

Add an Assignment element:

  • {!messagingSessionId} (variable) = {!Get_Messaging_Session.Id}

Consider adding a Fault Path with an Assignment element on the Get Records element. Within the Assignment, populate the variables of ‘ErrorLocation’ and ‘ErrorMessage’ with text templates of the values you want to pass to yourself as you test. E.g., ErrorLocation = Get Messaging Session Error’ and ErrorMessage = Running Flow Interview > Fault Message. 

Create/Update the Inquiry record

Add a Get Records element labeled, Find Existing Inquiry against the Inquiry object. 

Filter Inquiry records via the following configuration:
• Id = {!InquiryID} (variable)
• Last Data Input Source = ‘Agentforce Chat’ or the value you decided to use for this field.
• Store only the first record.
• Automatically store all fields. 

Add a Decision element to determine whether an Inquiry was found. 

Inquiry Exists
• Within Resource select {!Find_Existing_Inquiry} (Get Records element) 
• Operator = ‘Is Null, and 
• Value = ‘False’

Default Outcome

  • ‘Create Inquiry’ records element detailed within 5.4b below.  Inquiry’s records element is detailed below

For the ‘Inquiry Record Exists – Update’ path, add a Decision element and evaluate all the Inquiry fields that could have been updated via Chat. For example, you may have decision elements for Student Type, Major, Term, Year, and Campus. 

A Decision element for each value will ensure no blank values overwrite actual data on any found Inquiry record. The flow will look like a waterfall, with all Decision elements evaluating each variable to ensure that any updated values passed via the Agent are captured in the Inquiry record that matches. 

  • Decision element input values example:
    • Student Type
      • {!StudentType} (variable) Is Blank = False

The Assignment element would be configured to populate the existing field with the new value. 

  • Assignment element input values example:
    • {!Find_Existing_Inquiry.TargetX_SRMb__Student_Type__c} = {!StudentType} (variable)

Once the values are finished evaluating, add an Update Records element labeled “Update Existing Inquiry.” You can manually input the values or use the IDs and all field values from a record or record collection. If you use the record collection, select ‘{!Find_Existing_Inquiry}’ within the Record or Record Collection record(s) to update. 

Consider adding a Fault Path with an Assignment element on the Get Records and Update Records elements. Within the Assignment, populate the variables of ‘ErrorLocation’ and ‘ErrorMessage’ with text templates of the values you want to pass to yourself as you test. E.g., ErrorLocation = Find Inquiry Error’ and ErrorMessage = Running Flow Interview > Fault Message.   

Create/Update the Inquiry record

For the default path, add a Create Records element labeled ‘Create Inquiry’.

The new Inquiry record should have the following values:

  • ContactID (variable) mapped to the Contact lookup field. 
  • MessagingSessionID (variable) mapped to the Messaging Session (custom field)
  • StudentType (variable) mapped to the Student Type field. 
  • Major (variable) mapped to the Anticipated Major/Program field.
  • Term (variable) mapped to the Term field. 
  • Year (variable) mapped to the Year field. 
  • Campus (variable) mapped to the Campus field. 
  • ‘Agentforce’ or custom value mapped to the Source field. 
  • LastDataInputSource formula resource ('Agentforce Chat' & ' ' & {!ChatID}) mapped to the Last Data Input Source field. 


Consider adding a Fault Path with an Assignment element on the Create Records element. Within the Assignment, populate the variables of ‘ErrorLocation’ and ‘ErrorMessage’ with text templates of the values you want to pass to yourself as you test. E.g., ErrorLocation = ‘Create Inquiry Error’ and ErrorMessage = Running Flow Interview > Fault Message.   

Create the Task when follow-up is needed

If you would like a follow-up Decision element and an associated Create Task/Case element for a student or agent escalation (asking for follow-up via a live user), follow these steps:

A Decision element evaluating whether follow-up was requested:

  • Decision element input values:
    • Yes Outcome --> {!FollowUpRequired} (variable) = True

The Create Records element would be configured to either create a Task (assigned to a specific user or via round-robin) or a Case (if you decide to pursue queues). 

For example, the Task record should be created with the following values:

  • TaskDescription (variable) mapped to Description (Comments). 
    • Pass the agent’s comments via agent instructions. 
  • OwnerID (variable) mapped to the Assigned to ID field. 
  • ‘Normal’ mapped to Priority field. 
  • ‘Not Started’ mapped to the Status field. 
  • TaskSubject (variable) mapped to Subject. E.g., ‘Follow Up Needed – Agent Chat’
  • ContactID (variable) mapped to the Student lookup field. 
  • InquiryID (variable) mapped to Related to ID

Consider adding a Fault Path with an Assignment element on the Create Records element. Within the Assignment, populate the variables of ‘ErrorLocation’ and ‘ErrorMessage’ with text templates of the values you want to pass to yourself as you test. E.g., ErrorLocation = ‘Create Task Error’ and ErrorMessage = Running Flow Interview > Fault Message.   

Add error/success handling assignments

If you have not already done so, consider adding a Fault Path on any Get, Create, or Update Records elements.  Include (at minimum) within the Assignment elements an ErrorLocation and ErrorMessage, and when necessary, pass failure or success messages with user-safe values the agent can pass to the chat.  

Activate the Flow and Connect It to the Agent Action

After the flow completes and is error-free, activate it and confirm that the agent’s action references the active flow version. 

Retest the input and output mappings after activation to ensure the action receives the expected values and returns the expected IDs and messages.

Step 8: Create the Create Contact and Inquiry agent action

Create the agent action that handles Contact and Inquiry creation and optionally creates a follow-up Task. Agent Actions should be clear, specific, and intent-driven (not technical). You should consider the following: “Would this name help the Agent choose the correct action without reading the full instructions?”

Recommended label and API naming

  • Agent Action Label: Create Contact Inquiry Task

The above provides a clear verb (Create), clear object(s) (Contact, Inquiry, and Task), making the name focused on intent. 

Action description

Use this action description setup basis:

Use this action only in pre-application inquiry scenarios when ApplicationIntent is not true, and ApplicationStartRequest is not true. Run this action once the first name, last name, and email address are available. Do not delay creating the inquiry while waiting for program, term, year, or other optional interest details. 

If you are only implementing the Answer Questions and Inquiry Creation actions, references to later processes that are not part of this process, such as Application Initiation, can be removed or adjusted.

Action settings

Configure the action with the following settings shown in the source document:

  • Reference Action Type: Flow
  • Require user confirmation: not selected
  • Show loading text: selected
  • Loading text: Creating contact

Configure the Action Inputs

Add the following inputs to the agent action and configure them as specified in the source material. 

Inputs
  • Campus — the user’s intended campus. The source shows this as a text input field, not required by default. 
  • ChatID — the messaging session ID. 
  • Email — the student’s email address exactly as provided by the user. The source says to ask for it only if missing and to ask the user to restate it if it appears invalid or incomplete. This input is marked as required and collected from the user. 
  • ConversationTranscript — the conversation transcript. 
  • FirstName — the student’s first name exactly as provided by the user. Ask for it only if missing. 
  • FollowUpRequired — a boolean value used to pass through whether follow-up is needed. 
  • LastName — the student’s last name exactly as provided by the user. Ask for it only if missing. 
  • Major — the student’s intended program, major, or academic interest if already provided. Optional. 
  • OwnerID — contact owner. 
  • StudentType — the student type if already provided, such as first-year, transfer, graduate, returning, or other. Optional. 
  • Term — the intended entry term, such as Fall, Spring, or Summer, if already provided. Optional. 
  • Year — the intended entry year, if provided. Optional. 
  • messagingSessionId — the current messaging session identifier, if available from context. Do not ask the user for this value. 

Configure the Action Outputs

Add the following outputs to the action so the topic can use the flow’s results. 

Outputs
  • ContactID — the created or matched Contact ID used for internal chaining and later actions. 
  • ContactWasCreated — a boolean value indicating whether a new Contact was created instead of matched. 
  • ErrorLocation — where an error occurred. 
  • ErrorMessage — a user-safe message describing the result of the action. 
  • InquiryID — the ID of the created Inquiry record. 
  • OwnerID — contact owner. 
  • TaskDescription — description of the Task created. 
  • TaskID — ID of the Task created. 
  • TaskSubject — subject of the Task created. 
  • UserMessage — a user-safe message describing the result of the action, such as ‘Contact and Inquiry created successfully’. 
  • outMessageMatch — a user-safe message for a matched/existing record path. 
  • outMessageNew — a user-safe message for a newly created record path. 
  • success — a boolean success flag. 

Step 9: Test the End-to-End Agent Behavior

Test the complete experience from the student’s first question through record creation. 

Minimum Test Scenarios

  • A student asks a general admissions question and receives an answer from approved knowledge. 
  • The agent then collects first name, last name, and email after at least one helpful response. 
  • The agent runs the create action once those required values are available. 
  • A new Contact is created when no match exists. 
  • A matching Contact is reused when a match exists. 
  • An Inquiry is created and tied to the Contact. 
  • A follow-up Task is created when the flow follow-up path is triggered. 
  • The agent does not claim the student’s information was saved unless the action was completed successfully. 
  • After the record is created, the agent asks one specific next-step question instead of ending generically. 

Customization Notes

This section provides a baseline structure, but you should still adapt it to your own org structure. 

Common Adjustments

  • Replacing prefixes and naming conventions in labels and API names to your preference.
  • Mapping custom field data to the institution’s actual object name, record types, and fields.
  • Adjusting task creation behavior if follow-up tasks are not part of the client’s process.

 

  • Was this article helpful?