Configure the Salesforce Data Adapter in MXO
The Salesforce Data Adapter provides integration between Salesforce Core and MXO, enabling the sharing of information between both systems, as follows:
- Provides MXO with access to customer insights and information held within Salesforce Core for use in decisioning.
- Provides your agents using Salesforce Core with information about the Next Best Conversation for a customer based on information stored in the MXO AEP.
- Provides MXO with the ability to drive action in Salesforce Core, based on customer activity on your Touchpoints. For example, creating a sales lead, opening a support case, or updating data for an existing customer.
- Provides your agents with information about a customers recent interactions across all Touchpoints so that they can better understand the customers context and journey up to the point they are interacting with them.
Example
A customer uses an online complaint form to contact their insurance company about an issue with their insurance policy. MXO opens a support case in Salesforce, detailing the customer's issue. A call center agent contacts the customer to discuss their complaint and MXO provides the call center agent with the next best conversation for that customer, based on the fact that the customer is unhappy. The next best conversation offers the customer a 15% discount if they decide to renew their insurance policy.
SOQL Queries
The Salesforce Data Adapter uses SOQL Queries to specify which data attributes to retrieve from your CRM and pass to MXO.
How Do I Build SOQL Queries?
We recommend using a query builder to build your SOQL queries. Salesforce Developer library, for example, offers a Force.com IDE solution, that you can use with your existing Eclipse distribution.
SOQL queries must include a reference to the key or keys required by Salesforce Core. These keys can be:
- Any captured attribute, selected from the Select the attribute to use as a key drop-down, or
- Any key attribute configured by you for your Space. Key attributes must be referenced by their API name.
Example SOQL Queries - single key used for lookup
Simple Example for Training Purposes
SELECT c.Id, c.Name From Contact c WHERE c.Email = '{key}'
Customer with Product Information
Select c.id, (Select Id, ContactId, AccountId, ParentId, RootAssetId, Product2Id, IsCompetitorProduct, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, IsDeleted, Name, SerialNumber, InstallDate, PurchaseDate, UsageEndDate, Status, Price, Quantity, Description, LastViewedDate, LastReferencedDate From Assets) From Contact c where c.id = '{key}'
Customer with Cases - including Case Status
Select c.id, (Select Id, Type, Status, Reason, Priority, Description From Cases) From Contact c where c.id = '{key}'
Filtered Sub-list
For example, customer with cases that have the status "Closed"
Select c.email, (Select Id, Type, Status, Reason, Priority, Description From Cases where Status!='Closed' ) From Contact c
Example SOQL Query - multiple keys used for lookup
Select id, firstname,lastname from Contact where id = '{sfid}' or email = '{email}'
To create a Salesforce Adapter
- In MXO, choose Collect.
- Select External Data, and then click Create.
- Choose Salesforce as the type of Data Adapter you want to add.
- Enter a name for the Data Adapter you are adding. Using a descriptive name makes it easier for you and your team members to know when to use the Data Adapter.
- Enter a brief description of the Data Adapter you are adding and when it should be used.
- Enter a caching period. By default, data is cached for 30 minutes.
- Click Let's get started.
- Enter the configuration details that define the adapter's behavior.
Field Description Select the attribute to use as a key Select the captured data attribute you want to use as the key for looking up data in Salesforce.Captured data attributes are stored in the Customer Metadata Data Adapter. SOQL query The SOQL query specifying the attributes to retrieve from Salesforce. This query must contain a placeholder for the key or keys required by Salesforce.A key can be any captured attribute, selected from the Select the attribute to use as a key drop-down, or any key attribute configured by you for your Space.
Note: Key attributes must be referenced by their API name.List Specify whether or not the returned data is expected to be in list format. You can select Not set, which acts as if No is selected, Yes, the root data model is a list, or No, the root data model is not a list. Salesforce environment The Salesforce environment to which you want to connect. Select either Sandbox or Production. By default, the environment is set to Production. Username The username for the Salesforce environment to which you are connecting. This is the username that MXO uses to access data in Salesforce. Password The password associated with the Salesforce username. Security token The Salesforce security token. In many Salesforce applications, this field implies the password and the security token; for this field, enter just the security token (and not the password). Key The key to use to test the SOQL query associated with the Salesforce data model. The value you provide must relate to a customer record in Salesforce that contains data for all the attributes defined in the SOQL query.Note that you can only use the attribute selected from the Select the attribute to use as a key drop-down to test the Data Adapter.During testing, the {key} attribute is replaced by the value entered in this field. - Click Test configuration. This tests and verifies that the new configuration details are valid.
- Click Apply.
- Click Save.