Companies around the world use Salesforce Cloud Computing and CRM solutions to manage their customer relationships. By integrating Modzy with Salesforce, unstructured text such as customer email or feedback can be triaged using AI-generated insights and support can efficiently prioritize and address high-value issues and challenges.
In this example, we prioritize support requests by analyzing customer feedback with a Sentiment Analysis model from the Modzy model marketplace.
Modzy Lightning Web Component must be installed into your Salesforce instance, configured, and opened for use by all appropriate users. Only a Salesforce administrator will be able to complete these steps. If these have been completed you may skip to the Salesforce Users section of this document.
Administrators: Your Salesforce instance must have Dev Hub enabled and have 'My Domain' deployed to users within your Dev Hub. LWC installation is beyond the scope of this document, but the Quick Start: Lightning Web Components course is a great beginning. Lightning Web Components Dev Guide and How to Deploy Lightning Web Component Files are also good introductions to the process.
- Install the Lightning Web Components from this repo by using VSC to run the command SFDX:Deploy Source to org or with the CLI tools by running
sfdx force:source:deploy -p force-app -u YourOrgName.
Retrieve the appropriate API Key from your Modzy account.
- Log in to your instance of Modzy
- Retrieve an appropriate Modzy API key. It is a good idea to create a new project and use the project API key to better organize and monitor activity related to this application.
A named credential specifies the URL of a callout endpoint and its required authentication parameters. Salesforce created Named Credentials as "a safe and secure way of storing authentication data for external services called from apex code such as authentication tokens."
- Have the Modzy API key from the previous step handy.
- In your Salesforce Org, enter the Setup page.
- In the Quick Search field, find "Named Credentials" and click to navigate there.
- Click the New Named Credential button.
- Enter the following information in the first section:
- Label: Modzy
- Name: Modzy
https://trial.app.modzy.com/api(or the location of your instance of Modzy)
- Under Authentication:
- Identity Type: Named Principle, which will designate this API key as valid for the entire organization.
- Authentication Protocol: Password Authentication
- Username: ApiKey (this is not used)
- Password: paste your full API Key here
- Now check the Allow Merge Fields in HTTP Header box and save.
To whitelist Modzy for access from within Salesforce you must register Modzy in your organization's remote site setting:
- In Salesforce, enter the Setup area.
- In the Quick Search field, find "Remote Site Settings" and click to navigate there.
- Click New Remote Site button.
- Enter Modzy for remote site name
https://trial.app.modzy.com/apior the location of your instance of Modzy for the Remote Site URL
- Mark as active and save.
After an admin has installed and configured the Modzy Lightning Web Component, users will see the results automatically. The sample template works on Salesforce Cases:
- Create a new Case in your account
- Fill out all appropriate fields.
- Modzy will calculate a sentiment score for each field (Subject, Description, Reason and Comments) and display.
- See it in action:
Updated 2 months ago