Salesforce
Plug PolyAI assistants into your Salesforce ecosystem.
Salesforce is a leading customer relationship management (CRM) platform that helps businesses manage customer interactions, track sales, and automate workflows. It offers a suite of tools for marketing, sales, commerce, and customer service.
Why use Salesforce with PolyAI?
Integrating Salesforce with PolyAI allows businesses to streamline workflows and enhance customer service capabilities over the voice channel. Examples include:
- Automated case creation: PolyAI’s voice assistant can collect details during customer calls and create cases in Salesforce automatically, reducing manual effort and improving data accuracy.
- Real-time customer insights: PolyAI retrieves customer details from Salesforce during calls, so calls are personalized and informed.
- Effortless follow-up: After a call, PolyAI can send customers follow-up text messages like reservation notifications or order confirmations.
Getting started
Before you begin, ensure you have the following:
- A Salesforce Account: Administrator access to a Salesforce account.
- PolyAI Access: Access credentials for the PolyAI Portal.
Set up Salesforce for API access
Follow these steps to enable API access in Salesforce:
- Enable API Access:
- Log in to Salesforce with admin privileges.
- Navigate to Setup > Users > Profiles.
- Edit the profile for the user account that will connect to PolyAI.
- Ensure the checkbox for API Enabled is selected.
- Create a Connected App:
- Go to Setup > App Manager.
- Click New Connected App.
- Fill in the following details:
- Connected App Name:
PolyAI Integration
. - API Name:
PolyAIIntegration
. - Contact Email: Enter your email.
- Enable OAuth Settings: Check this box.
- Callback URL: Enter
https://www.example.com/oauth/callback
(replace with your actual callback URL). - Selected OAuth Scopes: Add
Full Access (full)
andPerform requests on your behalf at any time (refresh_token, offline_access)
.
- Connected App Name:
- Save the connected app and note the Consumer Key and Consumer Secret.
- Provide PolyAI with the Required Information:
- Client ID: The Consumer Key of your Connected App.
- Client Secret: The Consumer Secret of your Connected App.
- Username: The Salesforce username for the integration.
- Password: The Salesforce password for the user, appended with the security token.
- Access Token URL: Typically
https://login.salesforce.com/services/oauth2/token
(for production) orhttps://test.salesforce.com/services/oauth2/token
(for sandbox). - Base URL: The root URL of your Salesforce instance (e.g.,
https://your_instance.salesforce.com
).
PolyAI will use these details to generate the necessary access_token
. Credentials will be passed in the Authorization header as specified in the OAuth spec.
Code example
The following is a simplified Python example that demonstrates how to create a case in Salesforce using their REST API.
Next steps
Keep in touch! Once you provide PolyAI with the necessary information (outlined above), they will reach out once your integration is configured. They will ensure the following is in good working order:
- Error Handling: Handle HTTP status codes like
401 Unauthorized
,403 Forbidden
, and400 Bad Request
. - Data Validation: Ensure users provide all required fields (e.g., names, valid phone numbers).
- Token Renewal: Monitor token expiration and re-run the OAuth flow to obtain fresh tokens.
Depending on your use case, PolyAI may need to support custom functionality. Let us know, and we will confirm if we can accommodate.
Additional resources
For further assistance, please contact PolyAI support at support@polyai.com