{"title":"Configure agent permissions","slug":"configure-agent-permissions","url":"https://support.storeconnect.com/articles/configure-agent-permissions","url_markdown":"https://support.storeconnect.com/articles/configure-agent-permissions.md","subtitle":null,"summary":"Grant your Agentforce agent access to StoreConnect objects and Apex classes by configuring the auto-created permission set, object-level read permissions, and sharing rules.","type":"Help_Documentation","video_url":"","keywords":"agent permissions, agentforce permissions, permission set, apex class access, object permissions, sharing rules, storeconnect objects, ai agent setup, salesforce permissions, configure permissions, agentforce setup","last_modified":"2026-08-21T07:12:35+0000","body_markdown":":::note\nThis topic relates to using AI agents to service your customers, not how to [use agents for building on StoreConnect](use-ai-agents-with-storeconnect).\n:::\n\nThe following example shows how to set permissions using Apex. You don't have to set them up this way if you are using Flows (the non-code method).\n\n## Set up agent permissions using Apex\n\n### Add Apex classes for permissions\n\n1.  In Salesforce, go to **Users \u003e Permission Sets**.\n\n2.  Locate the permission that was auto-created when you added the agent. It will have the same name. For example, **Steve\\_the\\_Sales\\_Rep**.\n\n3.  Open the permission record. \n\n4.  Select **Apex Class Access.** (Note: For Flows you would select **Flow Access**)\n\n    ![Add apex class for agent permissions](https://res.cloudinary.com/hzkr6fi81/image/upload/v1765236266/knowledge/AgentforceAI/Build_and_configure_your_agent_1-assign-permission-sets_rzzjcj.png) \n\n5.  Add the following Apex Classes: \n\n    1.  s\\_c.AFGetPurchasableProductIdsInvocable\n\n    2.  AFPurchasableProducts\n\n\n### Grant access to StoreConnect objects\n\n1.  Go to the **Object Manager**.\n\n2.  Open the **Product2** object record and and grant read access on the object and on the following object fields:\n\n    -   **s\\_c\\_\\_Available\\_On\\_\\_c**\n\n    -   **s\\_c\\_\\_Display\\_Name\\_\\_c**\n\n    -   **ProductCode**\n\n    -   **s\\_c\\_\\_Features\\_Markdown\\_\\_c**\n\n    -   **s\\_c\\_\\_Subscription\\_Term\\_\\_c**\n\n    -   **s\\_c\\_\\_Subscription\\_Term\\_Count\\_\\_c**\n\n    -   **s\\_c\\_\\_Subscription\\_Term\\_Unit\\_\\_c**\n\n    -   **s\\_c\\_\\_Subscription\\_Type\\_\\_c**\n\n    ![Read permission for object fields](https://res.cloudinary.com/hzkr6fi81/image/upload/v1765236269/knowledge/AgentforceAI/Build_and_configure_your_agent_2-assign-object-permissions_c58asj.png) \n\n3.  The PricebookEntry will already have the permissions required as we are only using standard fields in this demo.\n\n4.  Open the **s\\_c\\_\\_Product\\_Media\\_\\_c** object and grant read access on the object and on the following fields:\n\n    -   **s\\_c\\_\\_Position\\_\\_c**\n\n    -   **s\\_c\\_\\_Product\\_Id\\_\\_c**\n\n5.  Open the **s\\_c\\_\\_Product\\_Media\\_\\_c** object and grant read access on the object and on the following field:\n\n    -   s\\_c\\_\\_Url\\_\\_c\n\n6.  Open the **s\\_c\\_\\_Products\\_Product\\_Categories\\_\\_c** object and grant read access on the object and on the following field: \n\n    -   Name\n\n7.  Open the **s\\_c\\_\\_Product\\_Category\\_\\_c** object and grant read on the object and on the following fields: \n\n    -   **s\\_c\\_\\_Active\\_\\_c**\n\n    -   **s\\_c\\_\\_Product\\_Id\\_\\_c**\n\n    -   **s\\_c\\_\\_Taxonomy\\_Name\\_\\_c**\n\n\n### Final checks before testing\n\n-   Make sure to assign the permission set to the Agent if it isn’t already.\n\n-   Grant record level access to the Agentforce Agent. This is usually done via sharing rules depending on your individual org setup. \n\n-   Recommended - While you are on the user page granting access for the agent, update the Name, Alias and Email address of the agent user. Add a valid email address as errors will be reported back this way.\n\n-   Make sure you’ve completed all the set up steps for your StoreConnect store, and you have products, images, etc. that can be accessed by the agent."}