You are here:
Guidelines for Creating Actions
Follow these guidelines to write effective action descriptions and to set up Service Assistant action inputs and outputs.
Required Editions
| View supported editions. |
Effective Action Descriptions
Action descriptions in Service Assistant follow the general Agentforce guidelines. Clear, specific descriptions make it easier for Service Assistant to match the information found in record data, subagent instructions, and knowledge articles to the right action.
An action description is a concise, natural-language statement of what the action does and when to use it. It can describe the action's goal or task, relevant use cases, and the Salesforce objects or records it uses or modifies. The more specific and concise the description, the more accurately Service Assistant can differentiate between actions and add the right one.
Here are examples of action descriptions and why they work well with Service Assistant.
| Action Description | Detail |
|---|---|
| "Sends a product return label to the customer by email. Use this action after the return is approved and the order record is verified." | The description names the specific task (send a return label), the channel (by email), and the conditions for use (after the return is approved and the order is verified). Because the conditions are explicit, Service Assistant matches the action to the right step and doesn't surface it before the return is approved. |
| "Summarizes the case and all assistance provided during the session. Use this action to close out the interaction and send a wrap-up email to the customer." | The description states both the goal (summarize the case and assistance) and when to use it (to close out the interaction). The wrap-up language maps to an end-of-plan step, so Service Assistant surfaces the action when the case is ready to be closed. |
| "Issues a refund to the customer's original payment method. Use this action after a billing error is confirmed and the refund amount is approved." | The description names the record it modifies (a refund to the original payment method) and the approvals that must come first. The preconditions keep Service Assistant from matching the action until the confirming and approval steps are complete. |
Service Assistant decides which actions to include in a plan based on how well your action descriptions match the context in the record details and grounding sources. Write descriptions that reflect how the task is described in your grounding source, including its order and intent. How you phrase a description depends on whether it needs to match a subagent instruction or a knowledge article.
Subagent instructions are explicit and direct. When an instruction identifies an action as a required step, mirror its language in the action description.
| Element | Example |
|---|---|
| Subagent instruction | Always retrieve the customer's contact record as the first step before taking any other action. |
| Action description | "Retrieves the customer's contact record and account details from Salesforce by name. Use this action as the first step when a service rep needs to verify a customer's identity." |
Knowledge articles cover broader scenarios rather than specific steps. Service Assistant retrieves article content based on the record context and references that information when generating the plan. Focus your action descriptions on the scenario and conditions described in the article, such as the customer situation or the resolution process, so that the right action is recognized when a relevant article is retrieved.
| Element | Example |
|---|---|
| Knowledge article | An article about resolving billing disputes |
| Action name | Get Billing History |
| Action description | "Retrieves the customer's billing history and recent transactions. Use this action when a service rep is investigating a billing discrepancy or disputed charge." |
Action Inputs and Outputs
What Service Assistant shows in the agent response after an action runs is controlled by the output field configuration in the action itself, not by your subagent instructions. Keep subagent instructions focused on when to invoke the action and what to do next. Use the action's input and output fields to control what data is collected and how results are presented.
Input fields
For input fields that require the service rep to provide information, turn on Collect data from user. This setting shows an entry field in the conversation for the service rep to fill in. If it's turned off, the entry field doesn't appear in the plan step even if Require input is selected. Turn on Require input on any field that's required before the action runs.
Use the Instructions field to describe what the input is and where it comes from. For example: "The full name of the contact as it appears in Salesforce. Used to look up the contact and retrieve their information."
You can also assign context variables to action inputs. Context variables provide Service Assistant with information about the current session, such as the ID of the record on the service rep's screen, without the service rep having to provide it manually. You can also use it so the action can perform work on behalf of that specific customer, such as looking up order history or updating related records. See Grounding with Context Variables.
Output fields
For each output field, turn on Show in conversation to include it in the agent's response. If this setting is turned off, Service Assistant doesn't add the field even if the action returns data for it. Without it turned on, Service Assistant moves on to the next step.
Use the Instructions field to describe what the output contains and how Service Assistant should present it. Be specific. Service Assistant uses this to determine how to incorporate the result into the step. Focus on describing the data itself. For example:
- "The name of the product order retrieved from Salesforce, such as PO-245. Used to confirm which record was found."
- "A summary of the customer's recent tasks and events logged in Salesforce. Present this to the service rep in full."
Actions executed in service plans are automatically saved into the plan history. When a service service rep asks for a summary of completed tasks, Service Assistant can draw on that history to describe what was done. Keep in mind that action output data isn't used to inform the grounding context for subsequent steps.
Action Confirmation
By default, Service Assistant can exectue a matched action automatically without waiting for the service rep. For any action that requires human confirmation before it runs, such as closing a case, issuing a refund, or updating a customer record, eanble Require User Confirmation on the action. When enabled, Service Assistant surfaces the action in the plan step and waits for the service rep to confirm before the action runs.
If you leave Require User Confirmation turned off, Service Assistant can run the action automatically as soon as it matches a plan step, without the service rep's review.
