Loading
Salesforce Mobile App
Innehållsförteckningar
Välj filter

          Inga resultat
          Inga resultat
          Här är några söktips

          Kontrollera stavningen av dina nyckelord.
          Använd mer allmänna söktermer.
          Välj färre filter för att utöka din sökning.

          Sök hela Salesforce-hjälpen
          Prepare Your Apex Action for Mobile Builder

          Prepare Your Apex Action for Mobile Builder

          For an Apex invocable action to be configurable in Mobile Builder for Agentforce, the action must meet these requirements.

          Requirement Why
          The invocable method returns a List<> of an Apex class. The builder renders responses as a carousel, which requires a list. For single-item responses, return a list with one element.
          All output fields use simple types: String, Integer, Boolean, Decimal. Nested objects and complex types aren't supported in Beta.
          The output is flat, without any no nested objects or lists within lists. The builder only exposes top-level fields as selectable in the property pane.
          The Show in Conversation flag is selected on the @InvocableVariable output variable. Without this flag, the action shows in the builder but can't be saved correctly.
          The output type is an Apex class, not a generic SObject. The builder reads field names and types from the Apex class.

          Example of a compatible Apex action:

          public class FetchRecipes {
              @InvocableMethod(label='Fetch Recipes' description='Returns a list of recipes')
              public static List<RecipeOutput> execute(List<RecipeInput> inputs) {
                  // Implementation
              }
          
              public class RecipeOutput {
                  @InvocableVariable(label='Recipe Title')
                  public String recipe_title;
          
                  @InvocableVariable(label='Cook Time')
                  public Integer cook_time;
          
                  @InvocableVariable(label='Image URL')
                  public String image_url;
              }
          }

          After you deploy the Apex class, create an Agentforce agent, topic, and action that point to the invocable method. Then return to Mobile Builder for Agentforce to configure its mobile layout.

           
          Laddar
          Salesforce Help | Article