Unleash your Salesforce data using the Amazon Q Salesforce Online connector | Amazon Web Services

Unleash your Salesforce data using the Amazon Q Salesforce Online connector | Amazon Web Services


Thousands of companies worldwide use Salesforce to manage their sales, marketing, customer service, and other business operations. The Salesforce cloud-based platform centralizes customer information and interactions across the organization, providing sales reps, marketers, and support agents with a unified 360-degree view of each customer. With Salesforce at the heart of their business, companies accumulate vast amounts of customer data within the platform over time. This data is incredibly valuable for gaining insights into customers, improving operations, and guiding strategic decisions. However, accessing and analyzing the blend of structured data and unstructured data can be challenging. With the Amazon Q Salesforce Online connector, companies can unleash the value of their Salesforce data.

Amazon Q Business is a generative AI-powered assistant that can answer questions, provide summaries, generate content, and securely take actions based on data and information in your enterprise systems. It empowers employees to be more data-driven, efficient, prepared, and productive.

Amazon Q Business offers pre-built connectors for over 40 data sources, including Amazon Simple Storage Service (Amazon S3), Microsoft SharePoint, Salesforce, Google Drive, Atlassian Confluence, Atlassian Jira, and many more. For a full list of data source connectors, see Amazon Q Business connectors.

In this post, we walk you through configuring and setting up the Amazon Q Salesforce Online connector.

Overview of the Amazon Q Salesforce Online connector

Amazon Q Business supports its own index where you can add and sync documents. Amazon Q connectors make it straightforward to synchronize data from multiple content repositories with your Amazon Q index. You can set up connectors to automatically sync your index with your data source based on a schedule, so you’re always securely searching through up-to-date content.

The Amazon Q Salesforce Online connector provides a simple, seamless integration between Salesforce and Amazon Q. With a few clicks, you can securely connect your Salesforce instance to Amazon Q and unlock a robust self-service conversational AI assistant for your Salesforce data.

The following diagram illustrates this architecture.

Types of documents

When you connect Amazon Q Business to a data source like Salesforce, what Amazon Q considers and crawls as a document varies by connector type.

The Amazon Q Salesforce Online connector crawls and indexes the following content types:

  • Account
  • Campaign
  • Case
  • Chatter
  • Contact
  • Contract
  • Custom object
  • Document
  • Group
  • Idea
  • Knowledge articles
  • Lead
  • Opportunity
  • Partner
  • Pricebook
  • Product
  • Profile
  • Solution
  • Task
  • User

The Amazon Q Salesforce Online connector also supports field mappings to enrich index data with additional fields data. Field mappings allow you to map Salesforce field names to Amazon Q index field names. This includes both default field mappings created automatically by Amazon Q, and custom field mappings that you can create and edit.

Authentication

The Amazon Q Salesforce Online connector supports OAuth 2.0 with the Resource Owner Password Flow.

ACL crawling

To securely index documents, the Amazon Q Salesforce Online connector supports crawling access control lists (ACLs) with role hierarchy by default. With ACL crawling, the information can be used to filter chat responses to your end-user’s document access level. You can apply ACL-based chat filtering using Salesforce standard objects and chatter feeds. ACL-based chat filtering isn’t available for Salesforce knowledge articles.

If you index documents without ACLs, all documents are considered public. If you want to index documents without ACLs, make sure the documents are marked as public in your data source.

Solution overview

In this post, we guide you through connecting an existing Amazon Q application to Salesforce Online. You configure authentication, map fields, sync data between Salesforce and Amazon Q, and then deploy your AI assistant using the Amazon Q web experience.

We also demonstrate how to use Amazon Q to have a conversation about Salesforce accounts, opportunities, tasks, and other supported data types.

Prerequisites

You need the following prerequisites:

Set up Salesforce authentication

To set up authentication and allow external programs to Salesforce, complete the following steps to configure your connected application settings:

  1. In Salesforce, in the Quick Find box, search and choose App Manager.
  2. Choose New Connected App.
  3. For Connected App Name, enter a name.
  4. For API name, enter an API name used when referring to the connected application.
  5. Enter your contact email address and phone.
  6. If you are using OAuth, select the right scope for OAuth.salesforce app manager new connected app
  1. Choose Save and wait for connected application to be created.
  2. On the Connected Apps page, select the application, and on the drop-down menu, choose View.
  3. On the details page, next to Consumer Key and Secret, choose Manage Consumer Details.salesforce app manager manage connected app
  1. Copy the client ID and client secret for future use in Salesforce.

Set up the Amazon Q Salesforce Online connector

Complete the following steps to set up the Amazon Q Salesforce Online connector:

  1. On the Amazon Q Business console, choose Applications in the navigation pane.
  2. Select your application and on the Actions menu, choose Edit.Amazon Q Edit application
  1. On the Update application page, leave settings as default and choose Update.
  2. On the Update retriever page, leave settings as default and choose Update.
  3. On the Connect data sources page, on the All tab, search for Salesforce.
  4. Choose the plus sign for the Salesforce Online connector.Amazon Q Connect Data Source
  1. In the Name and description section, enter a name and description.
  2. In the Source section, for Salesforce URL, enter your Salesforce server URL in https://yourcompany.my.salesforce.com/Amazon Q Connect Salesforce Data Source
  1. In the Authentication section, choose Create and add new secret.
  2. Enter the Salesforce connected application authentication information and choose Save.
    Create a secret in AWS secrets manager
  1. In the IAM role section, choose Create a new service role (recommended).

create new service role

  1. In the Sync scope section, select All standard objects.

If you choose to sync only specific objects, then select each object type accordingly.

Define sync Scope

  1. In the Sync mode section, select New, modified, or deleted content sync.

sync mode

  1. Under Sync run schedule, choose the desired frequency. For testing purposes, we choose Run on demand.

sync run schedule

  1. Choose Add data source and wait for the connector to be created.
  2. After the Salesforce connector is created, you’re redirected back to the Connect data sources page, where you can add additional data sources if needed.
  3. Choose Next.
  4. On the Update groups and users page, assign users or groups from IAM Identity Center set up by your administrator. Optionally, if you have permissions to add new users, you can select Add new users.
  5. Choose Next.

assign new users

  1. Choose a user or group from the list to give them access to the Amazon Q web experience.
  2. Choose Done.

  1. Choose Update application to complete setting up the Salesforce data connector for Amazon Q Business.

Additional Salesforce field mappings

When you connect Amazon Q to a data source, Amazon Q automatically maps specific data source document attributes to fields within an Amazon Q index. If a document attribute in your data source doesn’t have an attribute mapping already available, or if you want to map additional document attributes to index fields, use the custom field mappings to specify how a data source attribute maps to an Amazon Q index field. You create field mappings by editing your data source after your application and retriever are created.

To update the field mapping, complete the following steps:

  1. On the Amazon Q console, navigate to your Amazon Q application.
  2. Under Data sources, select your data source and on the Actions menu, choose Edit.

Amazon Q data sources

  1. In the Field mappings section, find the item that you want to add fields to and choose Add field. (For this post, we add the postalCode field to Lead.)
  2. Add any other fields that you want to be included in the Amazon Q index and then choose Update.

Amazon Q connector fields mapping

The setup process is complete.

  1. In the application details, choose Sync now to start the Amazon Q crawling and indexing process.

The initial sync may take a few minutes to get started.

When the sync process is complete, you can see a summary of ingested data on the connector’s Sync history tab. Check Total items scanned and Added to confirm that the right number of documents are included in the index.

Amazon Q Data source details

Mapping custom fields

Salesforce allows you to store your unique business data by creating and using custom fields. When you need to fetch a custom field to generate answers, additional steps are needed for mapping and crawling the field. For example, knowledge articles in Salesforce use custom fields to store content of articles.

Make sure the initial sync process for the connector is complete. On the initial sync, the connector gets a list of all fields and objects in Salesforce, which is needed for custom fields mapping.

Complete the following steps to index contents of knowledge articles:

  1. Navigate to Salesforce Setup and search and open Object Manager.
  2. In Object Manager, choose the Knowledge

Salesforce object manager

  1. In the Fields & Relationships section, find the field name (for this example, we’re looking for Article Body and the field name is Article_Body__c) and record this field name.

Salesforce Object manager fields and relationships

  1. On the Amazon Q Business console, navigate back to your application and choose Data sources in the navigation pane.
  2. Select the Salesforce data source and on the Actions menu, choose Edit.

Amazon Q Edit Data sources

  1. In the Field mappings section, under Knowledge Articles, choose Add field.
  2. For Salesforce field name, enter Article_Body__c and map it to _document_body for Index field name.
  3. Select your object type.
  4. Choose Update to save the changes.

  1. Return to the Data sources page of the application and choose Sync now.

When the sync process is complete, you can chat with Salesforce data source about default fields and also the Salesforce custom field that you added.

Sync Data Sources - Sync Now

Talk with your Salesforce data using the Amazon Q web experience

When the synchronization process is complete, you can start using the Amazon Q web experience. To access the Amazon Q application UI, select your application and choose Customize web experience, which opens a preview of the UI and options to customize it.

Amazon Q applications list

You can customize the values for Title, Subtitle, and Welcome message in the UI. After you make changes, choose Save and then choose View web experience.

Amazon Q Business web UI

After signing in, you can start chatting with your generative AI assistant. To verify answers, check the citation links included in the answers. If you need to improve answers, add more details and context to the questions.

Amazon Q Business chat

The results aren’t limited to cases and activities. You can also include other objects like knowledge bases. If a field isn’t included in the default mapped fields, you still can add them in the retriever settings and update the content index.

Let’s look at opportunities in Salesforce for a specific company and ask Amazon Q about these opportunities.

AMaon Q Business - getting summary of opportunities

After opportunities, check a sample knowledge article from Salesforce.

Salesforce - example knowledgebase article

When you chat with Amazon Q, you can see the exact article is referenced as the primary source.

Amazon Q chat about cost optimization

As you can see, each answer has a thumbs up/thumbs down button to provide feedback. Amazon Q uses this feedback to improve responses for all your organization users.

Metadata fields

In Salesforce, document metadata refers to the information that describes the properties and characteristics of documents stored in Salesforce. The Amazon Q data source connector crawls relevant metadata or attributes associated with a document. To use metadata search, go to the Amazon Q application page and choose Metadata controls in the navigation pane. Select the metadata fields that are needed, for instance sf_subject and sf_status. This allows you to ask metadata lookup queries such as “Summarize case titled as supply chain vendors cost optimization” or “Give me status of case with subject as cloud modernization project.” Here, the sf_status and sf_subject metadata fields will be used to query and generate the relevant answer.

Amazon Q metadata search

Frequently asked questions

In this section, we discuss some frequently asked questions.

Amazon Q Business is unable to answer your questions

If you get the response “Sorry, I could not find relevant information to complete your request,” this may be due to a few reasons:

  • No permissions – ACLs applied to your account don’t allow you to query certain data sources. If this is the case, reach out to your application administrator to make sure your ACLs are configured to access the data sources.
  • Data connector sync failed – Your data connector may have failed to sync information from the source to the Amazon Q Business application. Verify the data connector’s sync run schedule and sync history to confirm the sync is successful.
  • No subscriptions – Make sure that logged-in users have a subscription for Amazon Q.

If none of these reasons apply to your use case, open a support case and work with your technical account manager to get this resolved.

Custom fields aren’t showing up in fields mappings

A custom fields list is retrieved after the initial full synchronization. After a successful synchronization, you can add field mappings for custom fields.

Clean up

To prevent incurring additional costs, it’s essential to clean up and remove any resources created during the implementation of this solution. Specifically, you should delete the Amazon Q application, which will consequently remove the associated index and data connectors. However, any AWS Identity and Access Management (IAM) roles and secrets created during the Amazon Q application setup process will need to be removed separately. Failing to clean up these resources may result in ongoing charges, so it’s crucial to take the necessary steps to remove all components related to this solution.

Complete the following steps to delete the Amazon Q application, secret, and IAM role:

  1. On the Amazon Q Business console, select the application that you created.
  2. On the Actions menu, choose Delete and confirm the deletion.
  3. On the Secrets Manager console, select the secret that was created for the connector.
  4. On the Actions menu, choose Delete.
  5. Set the waiting period as 7 days and choose Schedule deletion.

delete secret

  1. On the IAM console, select the role that was created during the Amazon Q application creation.
  2. Choose Delete and confirm the deletion.

Conclusion

In this post, we provided an overview of the Amazon Q Salesforce Online connector and how you can use it for a safe and seamless integration of generative AI assistance with Salesforce. By using a single interface for the variety of data sources in the organization, you can enable employees to be more data-driven, efficient, prepared, and productive.

To learn more about the Amazon Q Salesforce Online connector, refer to Connecting Salesforce Online to Amazon Q Business.


About the Author

author mehdy haghy Mehdy Haghy is a Senior Solutions Architect at the AWS WWCS team, specializing in AI and ML on AWS. He works with enterprise customers, helping them migrate, modernize, and optimize their workloads for the AWS Cloud. In his spare time, he enjoys cooking Persian food and tinkering with circuit boards.



Source link
lol

By stp2y

Leave a Reply

Your email address will not be published. Required fields are marked *

No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.