All Collections
Integrations & API
Salesforce
Installation & Configuration: Agent Connect Salesforce Managed Package
Installation & Configuration: Agent Connect Salesforce Managed Package
Updated over a week ago

Installation & Configuration: Agent Connect Salesforce Managed Package

Highlights of New Package:

This new version of the Agent Connect Salesforce Managed Package introduces the ability to connect a single Salesforce environment to multiple Agent Connect instances. This update will allow clients with multiple Agent Connect instances to send data from Salesforce to each specific instance to trigger Feedback and Service Recovery surveys.

You’ll notice upon installation that there will be the ability to enter multiple sets of API Keys - this will be the largest visible update and can continue to be leveraged with a single set of API Keys to a single Agent Connect instance or multiple sets of API Keys (one for each Agent Connect instance).

We’ve also added the option to map multiple base objects in the Managed Package to allow for surveys to be generated from other objects than Case.

Additional improvements have been made to error monitoring and handling to ensure that the managed package is monitoring the status of the integration each hour and will send an email error notification if the managed package should turn off.

You can follow the instructions below to install and configure the new managed package.

Pre-Installation Recommendations:

Before updating to the new version, if you already have field mappings for base objects from an older version of our managed package, we highly suggest taking a screenshot of those field mappings for reference. Guidance on backing up your data from Salesforce can be found in their article here.

Pre-Installation Steps if Using an Active Version of the Managed Package:

  1. In the active version of the Agent Connect Manage Package turn off the Managed Package. On the Agent Connect Configuration tab update the following settings:

  • Requests Auto Triggering: Off

  • Data Return: Off

  • Service Recovery: Off

2. Within Scheduled Apex Jobs delete the following jobs:

  • Stella Connect Request Sender

  • Stella Connect Job Monitor

  • Stella Connect Data Return

  • Stella Connect Service Recovery

Important Note: If leveraging an older version of the Managed Package (v1.48 or earlier) the endpoint for the Agent Connect Managed Package should be audited and updated to ensure that is is leveraging https://api.stellaconnect.net/ in place of https://sapi.stellaconnect.net. Using the older endpoint may generate an error in the managed package within Apex Jobs.

You can audit your endpoints under Custom Settings and select Manage next to Agent Connect Request Configuration, Agent Connect Response Configuration, and Agent Connect Service Recovery Configuration objects and audit the endpoints.

If you observe that the endpoints are leveraging https://sapi.stellaconnect.net and need to be updated, use the Edit option to update the endpoints for Test and Production to https://api.stellaconnect.net/. Retain the unique endpoint information following https://api.stellaconnect.net/ such as https://api.stellaconnect.net/v1/recoveries

Note: If your Agent Connect instance is hosted on our European Data Center the endpoint https://fra1-connect-1.api.stellaconnect.net/ should be leveraged in place of https://api.stellaconnect.net/. If you are not sure which Data Center you instance is hosted on please contact our Support Team!


Step 1: Install the Managed Package

Visit the link below to begin the installation of the Agent Connect managed package:

Once you see the installation panel:

  1. Select All users, check the acknowledgment box and click next.

  2. Grant access to 3rd party websites and continue. The installation will begin. Click Done when the installation completes.

  3. Review the installed managed package and confirm that the status is listed as ‘Active’. If the status is reflected as being in ‘Trial’ please connect with your Professional Services Team or our Support Team so that we can notify our licensing team to convert to Active. Integrations that remain in ‘Trial’ will be automatically disabled after 30 days.

Now you can begin configuring!

Configure API Key(s) and Update Integration Status

Retrieve your API Keys and Secret Key from the Integrations page within Agent Connect. If you do not have access to Agent Connect and need your API keys, please reach out to your organization's Agent Connect Company Admin. If your secret key has already been downloaded by someone in your organization, they will need to provide that key to you, as well.

Navigate to the Integration Status tab. This can be found in the Salesforce App Launcher as “Agent Connect Configuration”.

On this page, select ‘New API Keys’ and enter a ‘Name’ which should refer to the Agent Connect instance which is being connected to Salesforce through the integration. Then insert the Test API Key, Production API Key, and API Secret Key and save your API Keys.

Next, enter your error alert email address, select Update Integration Status to save, and move on to Step 2 before adjusting the additional fields on this page.

Step 2: Create Trigger and Data Mapping

Create Lookup Field(s) on the Request Object

Next, you'll create a new custom lookup field on the Agent Connect Request object in your Object Manager. This field is used to look up to the base object that you'll track your interactions on. You'll need to create a custom lookup for each object being used to trigger Connect Requests.

Note: This step can be skipped for Tasks and Events base objects since a custom lookup is not available for these types of Salesforce objects. It is strongly recommended that you map to Case Objects.

  1. In Setup, enter Object in the Quick Find box, then find and select Agent Connect Request

  2. Select New, and then Lookup Relationship, then Next.

  3. Select your base object from the dropdown menu

  4. The field label will be populated by default

  5. Enter a field name. You could use Case_Lookup if your base object is case, for example.

  6. Description: This is the object that triggers a Agent Connect Request

  7. Select Next

  8. Set your field-level security, click next and save.

Create DateTime Field on Base Object(s) to Store Trigger in Salesforce

On your base object(s), create a new custom Date/Time field that will be used to identify when an interaction is eligible for an Agent Connect feedback request.

  1. Field label: Send Agent Connect Request at and tab through field name

  2. Description: This is the time at which an object becomes eligible to receive a Agent Connect Request

  3. Click Next

  4. Set your field-level security and ensure the field is visible on the page layout, click Next through, and save

Note: If you will be sending data from Salesforce to multiple Agent Connect instances for the same base object (ex: Case will always be the base object but delivered to separate instances based on other criteria) a date/time field will need to be created for each instance which will be leveraged for multiple Field Mappings for the base object.

Create a Record-Triggered Flow in Salesforce

Salesforce is in the process of retiring Workflow Rules and Process Builder. Salesforce has over the last few years greatly increased the capabilities of Flows which will be leveraged for this integration. The following instructions assume:

  1. The data you are sending to Agent Connect is on the Case object

  2. You have administrator rights in your Salesforce org

You’ll create a new Flow which will populate the previously created DateTime field, based on actions that your team members complete, for each base object. Agent Connect uses this field to determine if a record is eligible to be processed by the Agent Connect Request Sender job.The Flow created should contain the business logic to include and exclude interactions from being surveyed.

Note: The timestamp is used to determine which objects should be included since the last job ran and does not denote the actual time that request was sent. Reminder: the job runs every 5 minutes in the background.

Example: If you'd like to make all Cases eligible for Connect requests as soon as they're closed, your flow would populate the custom DateTime field with the time that the Case was closed.

  1. Enter ‘Flow’ in the Quick Find Box and select New Flow

  2. When Flow Builder loads, select Record-Triggered Flow

  3. Next, configure the logic for how the flow is triggered

For this example, we want the flow to run any time a case is updated and has been updated when the Case is closed and has a Contact Email present to receive the survey via email. Flows should be customized as needed to use the fields and conditions needed by your organization.


4. Select Object: Case

5. Configure Trigger: A record is updated
6. Set Entry Conditions: All Conditions Are Met (AND):

  • Status Equals Closed

  • ContactEmail Is Null False

7. When to Run the Flow for Updated Records: Only When a record is updated to meet the condition requirements

8. Optimize the Flow for: Fast Field Updates

Note: If sending data to a single Agent Connect instance (most likely scenario for the majority of integrations) the flow can then follow a simple path to Add an Element to Update the Record to set the Field Values for the formerly created Send Agent Connect Request date/time field to populate the Current Date/Time.

Cases (or additional mapped objects) will then be captured by the Stella Connect Request Sender Job that will search for eligible objects every 5 minutes based on the population of the timestamp into the mapped eligibility field.


Note: If sending data to multiple Agent Connect instances the Flow will require a Decision element to set the logic on delivering the correct object data to the corresponding Agent Connect instance. If you are not connecting your Salesforce environment to multiple Agent Connect instances skip ahead to the next section on Field Mappings.

In the Decision configuration screen give the element a label, API name and optionally a description. Configure an outcome for each path that would require for a record to be triggered to a distinct Agent Connect instance. For example, if three Agent Connect instances are being leveraged, configure three outcomes which will align to the corresponding instance based on your business logic.

Now that the decision and the outcomes have been configured, add an Update Triggering Record element for each outcome. The record will need to be updated to populate the date/time field previously created to mark the record as being eligible to be delivered to Agent Connect.

As noted earlier - if you are sending data from Salesforce to multiple Agent Connect instances for the same base object there will need to be multiple date/time fields which will be aligned to each instance. If this is true for your business case you will need for the update to the triggering record to be aligned to the corresponding date/time field.

Step 3: Create Field Mapping(s) to Send Data to Agent Connect

On the Agent Connect Configuration page, you'll create a Field Mapping for each Base Object that will trigger a Connect request. Create a field mapping tab by clicking the + sign. Each field mapping will tell the application where to find the appropriate piece of information required to send a feedback request.

To complete the field mapping you’ll select the API Keys (previously saved on the Configuration page) that will be leveraged when sending data to Agent Connect. Toggles will then be available within the Field Mapping settings to switch the API Keys between Test and Production.

The mapped field will be unique for each integration based on how your organization manages data fields within your environment of Salesforce. Further details on each included field can be found in our Field Mapping Help Article but the selection of the best corresponding mapped field will be best determined by the Salesforce administrator for your organization.

Note: If you are sending data to multiple Agent Connect instances select the API Key Name for the API Keys to the corresponding instance for that object.

If you are sending data to multiple instances for the same base object, also make sure to map the correct date/time field that was previously created and which is being populated based on the outcomes defined earlier in each outcome of your Flow.

Be sure to save each field mapping tab using the Save Field Mapping button in the lower left hand corner when you’re done.

Step 4: Test and Then Deploy to Production

Testing

To test the integration, set each of the tabs for each object under Field Mapping to ‘Test’. Your team can then continue with their standard workflows that were captured in the triggering Flow events. You can alternately choose to test by replicating those scenarios in a Sandbox environment.

All surveys will be delivered to the address entered into the API Test Email field on the Integrations page within Agent Connect while your integration is set to ‘Test’.

This allows you or the designated testing point of contact to see what your customers will see when they receive a survey. You can step through the customer experience selecting a star rating, commenting, etc. There is no response collection while the integration is set to ‘Test’ using the Test API Key.

Note: Please ensure that you are closing cases owned in Salesforce by a person who has an active Agent Connect profile and that you have each channel you will use in Agent Connect enabled so that you can pass through the correct case origin. If the employee email delivered in the object data does not match an active profile in Agent Connect the survey request will fail.

Test data is collected on the Test Requests tab of the API Status Page in Agent Connect: https://yourdomain.agentconnect.net/admin/company/api/request_status

Testing is an opportunity to confirm that the field mappings and workflow you've set up are behaving as expected. If agents have been sending manually, they can continue to do so while you're testing. Please note that because no response collection is occurring during testing the Data Return and Service Recovery functions will not return data until the integration is moved to Production.

The test period should be long enough to experience all types of use cases and variations of the triggers you built, to ensure that they're working as you intended.

Additional Note on Testing: Most customers test the generation of the survey request and interaction creation in Agent Connect levering the Test API Key and monitoring from the API Status Page. If you wish to test in a Salesforce Sandbox environment that sets the integration to Production you may perform this as a secondary step but any data sent to Agent Connect will then deliver a survey request, collect response, and create interaction records since you will be connected to the production environment of Agent Connect.

Moving to Production & Going Live!

Everything looks good? Test requests are being created for each interaction that you would want a Agent Connect request to be sent out for? Great!

Go to the Field Mapping tab of the Agent Connect Configuration page and set the Auto-triggering status for each mapped object to Production.

In Agent Connect, on your Integrations page (https://yourdomain.agentconnect.net/admin/company/api), switch the appropriate Integrated Channels to ON. This example shows that phone, chat, and email will be integrated. Turning a channel on here will remove the manual send box from the Stream.

​You're done!

Now that you're on Production, you can monitor Salesforce to ensure that requests are being created when cases are closed (or any other triggering event you've set up)! You can monitor in Salesforce through the Agent Connect Requests and Agent Connect Scheduled Jobs pages that were created with the installation of the package. If you should encounter any issues within the lifecycle of the integration please refer to our Error Tracing Guide or reach out to our Support Team.

Invalid Requests that reach Agent Connect will be listed on your API Status Page (https://yourdomain.agentconnect.net/admin/company/api/request_status) to ensure that requests have all of the required information needed to be successfully sent to your customers. If requests are appearing on the Invalid Requests tab, you'll see an error under each request that tells you why that request failed so that you can make necessary corrections in Salesforce.

Survey eligible requests will now start being delivered to customers and responses will flow into the Stream page of Agent Connect. Interaction records will also be generated and can be viewed within the platform under QA - Interactions or by performing an Export of All Requests in Agent Connect.

Data Return

If you want to see Agent Connect survey responses delivered into Salesforce you can enable our Data Return Feature from the Agent Connect Configuration page. Toggle the Data Return setting to Enabled - v2

You may customize the mapping of the data returned using the Data Return tab within the Agent Connect Configuration page.

If you have implemented a particularly complex survey or customized solution within Agent Connect (very infrequent scenario) or do not see data populating back into the standardized fields you may wish to connect with your Professional Services Manager or reach out to our Support Team.

Did this answer your question?