7Social Channels

This chapter contains the following:

Configure Social Channels

How You Set Up Social Channels

Using the social channel you can serve customers faster by reaching them where and when they engage with you on social networks. With the social channel you can create service requests (SRs) from social network posts, provide customer service through the social network, and you can track your SR lifecycle on the service application.

To use the social channel, you have to integrate B2B Service with a platform that manages your social network posts, such as Oracle Social Cloud, using Oracle Integration Cloud. Once that integration is set up, you can then set up the social channel for SRs.

As an administrator, you can configure the social channel in the service application to enable your users to create SRs based on social network posts. Social posts from the third-party social relationship management software are added as SRs in the service application and are assigned to agents.

Here's a brief overview of the steps required to set up social channels in the service application.

  1. Create social channels for SRs in the service application.

  2. Integrate B2B Service with Social Cloud.

    See "Integrate Social Channels" for information about creating an integration user, importing the integration package, creating connections, and activating the integrations for the social channel.

Process Flow for Social Posts

Here's a sample process flow for social posts:

  1. Community managers in Social Cloud send social posts to the service application and create SRs for a social post.

  2. Support agents review and respond to social posts (both public and private).

    1. Service requests are created in the service application for social posts sent from Social Cloud.

    2. Once an SR is created, the Social Cloud post is updated with the SR reference number.

    3. Photos and videos added to social posts are displayed as attachments to service request messages.

    4. Users can drill down on the attachments to view the photos and videos.

      Note: To view attachments to private messages, users must sign in to Social Cloud.
  3. Any new reply or comment by the customer to an existing conversation is automatically added to the existing SR. These messages are added as SR messages.

  4. Once an SR is resolved, the Social Cloud post is updated to indicate that the corresponding SR is resolved. If an SR is reopened after it's resolved, Social Cloud is also updated with the status change.

Supported Social Networks

B2B Service supports Facebook, Twitter, Instagram, Weibo, and WeChat social network channels. Here's a list of supported features for the various social network monitoring scenarios.

Here are the features supported for the social network monitoring scenarios.

Social Network Monitoring Scenarios Facebook Twitter Instagram Weibo WeChat

Monitor public messages

Yes

Yes

Yes

Yes

No

Monitor comments and replies on public messages

Yes

Yes

Yes

Yes

No

Monitor private messages

Yes

Yes

Yes

Yes

Yes

Monitor replies to private messages

Yes

Yes

Yes

Yes

Yes

Note:
  • If you're sending photos and videos with private messages on either Twitter or Facebook you must sign in to the Social Cloud application.

  • Customers using Instagram can't post on the brand company page.

  • Social Cloud doesn't retrieve attachments to a private message on Weibo.

  • Social Cloud doesn't support monitoring of public messages on WeChat.

This table shows you the supported features for social response scenarios:

Social Response Scenarios Facebook Twitter Instagram Weibo WeChat

Reply to public messages

Yes

Yes

No

Yes

No

Reply to comments and public messages

Yes

Yes

Yes

Yes

No

And this table shows features supported for other scenarios:

Other Scenarios Facebook Twitter Instagram Weibo WeChat

Update Social Cloud conversation with SR reference number for a social post

Yes

Yes

Yes

Yes

Yes

Update Social Cloud conversation when an SR is resolved

Yes

Yes

Yes

Yes

Yes

Update Social Cloud conversation when an SR status changes from Resolved to In Progress

Yes

Yes

Yes

Yes

Yes

Fields Mapped between Social Cloud and B2B Service

Social posts sent by community managers are created as social SRs (SRs with channel type as Social).

This table describes the field mapping between Social Cloud and B2B Service.

B2B Service Field Value Source

Channel Type

Social

All social posts

Channel

Name of the social network where the customer posted the message (for example, Facebook)

Social Cloud

SR Title

First 400 characters of the social post content

Social Cloud

Problem Description

First 1000 characters of the social post content

Social Cloud

Primary Contact

If a contact point is found for the social post author, the primary contact is set in the SR

Auto populated by B2B Service

SR Account

The primary account associated with the primary contact of the SR (if exists)

Auto populated by B2B Service

SR Creation Date

Current date

Auto populated by B2B Service

Service Request Message

Every message or post in the conversation with the customer is created as an SR message

Social Cloud post content

Create Social Channels for Service Requests

Before using the Social feature, you must first create the social channel in the service application. Here's how:

  1. In the Setup and Maintenance work area, go to the following:

    • Offering: Service

    • Functional Area: Communication Channels

    • Task: Manage Communication Channels

    The Service Channels page is displayed.

  2. Click Create Channel.

  3. In the Create Channel dialog box, do the following:

    1. From the Stripe Code drop-down list, select CRM.

    2. From the Channel Type drop-down list, select Social.

    3. From the Network drop-down list, select a supported social network.

    4. In the Account Name field, enter the social handle or fan page name of the selected social network. This must match the social resource name in the integrating Social Cloud application.

    5. Verify whether the generated Channel Code is unique.

      • Channel Code is automatically generated by the application. You can use this autogenerated code as is, and you must modify it only when it's not unique. To make it unique, you can add any set of characters.

      • Channel Code is used by the application to uniquely identify a channel when exporting and importing channels from one environment to another.

    6. Enter a Display Name to provide information about the channel, such as the name of the deploying company for which the channel is being configured.

    7. From the Business Unit drop-down list, search for and select a business unit (BU), when multiple business units are configured.

      The BU set in the scope is selected by default, but you can select a different BU. This field is visible only if the multiple business units feature is enabled.

    8. To deactivate the newly created channel, clear the Active option. It's active by default.

    9. Click Save.

  4. Create a new channel for every social network that you want to use.

  5. Save the social channels.

Integrate Social Channels

How You Integrate B2B Service with Social Cloud

After you create a social channel in the service application, you have to then integrate B2B Service with Oracle Social Cloud to use that social channel. Here are the steps:

  1. Create an integration user with privileges to perform the integration with Social Cloud.

  2. Import the integration package from Oracle Marketplace.

  3. Import SSL certificates for B2B Service and Social Cloud.

  4. Activate connections to B2B Service and Social Cloud.

  5. Activate the integrations.

  6. Set up the Integration Cloud plug-in in Social Cloud.

  7. Set up CSF SOA key after activating the integrations.

The steps are covered in detail in the topics that follow.

Create an Integration User for the Social Channel

To integrate B2B Service with Social Cloud, Oracle recommends that you create a user specifically for the integration. The integration user must be able to call the B2B Service service catalog or event catalog web services from Integration Cloud.

Here's how you create an integration user along with information on what privileges you provide to what role:

The following procedure describes how to create an integration user and what privileges to provide to the role.

  1. Sign in to the application as an administrator.

  2. Select Navigator > My Team > Users and Roles. The Search Person page is displayed.

  3. Click Create. The Create User page is displayed.

  4. Enter the following details for the new user:

    Field What you enter or choose

    Last Name

    The last name of the user.

    Email

    The user's valid email address.

    Hire Date

    Choose today's date.

    User Name

    The user name of the user.

    Person Type

    Choose Employee from the drop-down list.

    Legal Employer

    Chose the legal employer from the drop-down list.

    Business Unit

    Choose a valid business unit.

    Send user name and password

    Choose this option.

    User Log in

    Enter the user name that you created.

    Password

    Enter the password for the user.

  5. Save the user details.

    An email is sent to the address after the user has been created.

  6. Check the user credentials sent in the email, sign in as the new user, and reset the password.

    After creating the user, sign in to the security console and add the following roles to the integration user

    • SOA Operator

      This is a duty role. It can't be directly assigned to a login using security console. Create an enterprise role as a parent of SOA Operator and associate that enterprise role to the integration user.

    • Customer Service Representative

    • Resource

Import the Integration Package

After setting up Engagement Cloud and creating the integration user with the required privileges, you then set up the Integration Cloud integration package.

Before you start setting up Integration Cloud, go to the Oracle Marketplace (https://cloudmarketplace.oracle.com/marketplace/en_US/homePage) and search and download the Engagement Cloud to Social Cloud integration package. For more information about Oracle Marketplace, see the Related Topics link for Oracle Cloud Marketplace documentation.

The Integration Cloud integration package supports the following:

  • Inbound

    • Create an SR in Engagement Cloud for a social post.

    • Add a social post comment as a message to an SR.

  • Outbound

    • Respond to a customer on the social network that they posted on.

Import SSL Certificates for B2B Service and Social Cloud Integration

You must import the SSL certificates before you configure and activate the connections.

To import SSL certificates for B2B Service, see "Uploading an SSL Certificate" in the Using the Oracle Sales Cloud Adapter guide, available at https://docs.oracle.com/en/cloud/paas/integration-cloud-service/icssc/index.html.

To import SSL certificates for Social Cloud, see "Uploading an SSL Certificate" in the Using the REST Adapter guide, available at https://docs.oracle.com/en/cloud/paas/integration-cloud-service/icsre/index.html.

Activate the Connections to B2B Service and Social Cloud

After you download the package and import the SSL certificates, connect to B2B Service using the sales adapter. The procedure for importing the adapter is described in the topic "Creating an Oracle Sales Cloud Adapter Connection", available at https://docs.oracle.com/en/cloud/paas/integration-cloud-service/icssc/index.html.

Configure the Connection to the B2B Service Instance

Here's how you configure the connections to your B2B Service instance.

  1. Sign in to the Integration Cloud application using your integration user credentials.

  2. Click the Connections icon on the home page.

  3. Ensure that Oracle B2B Service is listed on the connections page.

  4. Click Oracle B2B Service to view the details.

  5. Click Configure Connectivity and enter the following information in the Connection Properties dialog box:

    • OSC Service Catalog WSDL URL: Enter the service catalog URL on your B2B Service instance

    • (Optional) OSC Event Catalog URL: Enter the event catalog URL on your B2B Service instance

  6. Click OK.

  7. Click Configure Security and enter the following information:

    • Security Policy: Enter Username Password Token.

    • User name: Enter the integration user name.

    • Password: Enter the password for the integration user.

    • Confirm Password: Reenter the password.

  8. Click OK.

  9. Click Test on the Actions bar of the service application page.

  10. Ensure that the connection test is successful and the status meter shows 100%.

  11. Click OK.

Configure the Connection to Social Cloud

Here's how you configure the Oracle Social Cloud connection:

  1. Sign in to the Integration Cloud application using your integration user credentials.

  2. Select Connections and then create a new connection for Oracle Social Cloud.

  3. Enter the connection details from this table:

    Section Details

    Connection Properties

    • Connection Type: REST API Base URL

    • TLS Version: Not Applicable

    • Connection URL: https://srm-api-temp.slc05hpo.oracle.com

    Security

    • Security Policy: OAuth Custom Three Legged Flow

    • Authorization Request: Enter the authorization request URL. The URL must have the following parameters defined:

      • scope=engage

      • response_type=code

      • redirect_uri=${redirect_uri}

      • To get your client ID, see Register your Client Application for procedure.

      For example, a sample authorization request URL looks like this: https://gatekeeper.srm-integration.pp1.oraclecloud.com/oauth/authorize?scope=engage&response_type=code&redirect_uri=${redirect_uri}&client_id=a9a5fb2b482545172fd6101e3c16cc1e9ba140742aa630b6c3e9055a89e6e9a2

    • Access Token Request: Enter the access token request with the correct URL, client ID, and client secret. For example, a sample access token request looks like this: -X POST -H 'Content-Type: application/x-www-form-urlencoded' -d 'false' 'https://gatekeeper.srm-staging.pp1.oraclecloud.com/oauth/token?code=${auth_code}&client_id=a9a5fb2b482545172fd6101e3c16cc1e9ba140742aa630b6c3e9055a89e6e9a2&client_secret=de969db4808a87746dbaf1fa648d552aa6dd1927da5ed2ee731c7ad62ee61b19&redirect_uri=${redirect_uri}&grant_type=authorization_code'

    • Refresh Token Request: Enter the refresh token request with the URL, refresh token, client ID, and client secret. For example, a sample access token request looks like this:-X POST -H 'Content-Type: application/x-www-form-urlencoded' -d 'false' 'https://gatekeeper.srm-staging.pp1.oraclecloud.com/oauth/token?refresh_token=${refresh_token}&client_id=a9a5fb2b482545172fd6101e3c16cc1e9ba140742aa630b6c3e9055a89e6e9a2&client_secret=de969db4808a87746dbaf1fa648d552aa6dd1927da5ed2ee731c7ad62ee61b19&grant_type=refresh_token'

  4. Save the configuration and test the connection.

Activate the B2B Service to Social Cloud Integrations

After you configure your connections, you must then activate these integrations:

  • Social Cloud Conversation to B2B Service

    This integration creates B2B Service social post records from Social Cloud conversation record and its related posts by mapping the object attributes of the two applications. B2B Service further processes the social posts to create service request and service request messages.

  • B2B Service Service Request to Social Cloud

    This integration updates the Social Cloud conversation object with the service request details.

  • B2B Service Reply to Social Cloud

    This integration updates the Social Cloud conversation with the response from B2B Service user to the social customer. Social Cloud in turn sends the response to the customer on the social network.

  • B2B Service Update SR to Social Cloud

    This integration updates Social Cloud conversation with the B2B Service service request number.

  • B2B Service Sync SR to Social Cloud

    This integration updates the Social Cloud conversation with the service request reference number from B2B Service. It's called when a B2B Service user sends a response.

Here's how you activate the integrations:

  1. Sign in to the Integration Cloud application using your integration user credentials.

  2. Click the Integrations icon on the home page.

  3. Search for each integration by its name.

  4. Click the Activate button on each integration.

  5. Select the Enable detailed tracing option, and click Activate on the confirmation dialog box.

  6. Ensure that the flow has been activated successfully.

  7. Repeat the previous steps for each integration.

Set Up the Integration Cloud Plug-in in Social Cloud

For more information about how to set up the plug-in in Social Cloud, see Related Topics.

Enter the CSF Key to Subscribe to SR Events

You must create a Credential Store Framework (CSF) key to subscribe to SR events in B2B Service. This key is required by the event handler framework when it initiates the integration. The credentials of the integration are managed by the CSF key. Create the CSF key in Oracle SOA Composer. Oracle SOA Composer provides a runtime environment for creating domain value maps, approval management extensions, business rules, and composite sensors in deployed composites, using service-oriented architecture (SOA). For more information about Oracle SOA Suite, see Related Topics.

Sample Groovy Scripts for Social Channel

Validate Agent's Response Character Count Script

This script validates whether an agent's response for the Twitter channel is less than or equal to 280 characters.

You must add this script as a validation rule to the Message object (child of Service Request object). You must also add a validation message that's displayed to the agents when their Twitter response is greater than 280 characters.

Use the following code as an example:

if(ChannelId == null){ 
    return true; 
}
def channelVO = newView('ChannelVO')
channelVO.appendViewCriteria("ChannelId = '${ChannelId}'")
channelVO.executeQuery()
def networkType = null
if(channelVO.hasNext())
{ 
    def channelRow = channelVO.next(); 
    networkType = channelRow.getAttribute("NetworkTypeCd") 
}
if(networkType == null || networkType != 'TWITTER') { 
    return true
}
String MessageContent = MessageContent.toString()
Long channelId = ChannelId
Long charCount = MessageContent.length();
String pattern = ~/(http|https):\/\/[-a-zA-Z0-9+&@#\/%?=~_|!:,.;]*/
if(null == MessageContent)
return true;
String message = MessageContent.toString()
String[] tokens = message.split(" ")
for(int i=0;i<tokens.size();i++){
    if(tokens[i].matches(pattern )) {
        //this is an url
        Long urlLength = tokens[i].length()
        if(urlLength > 23)   { 
            charCount = charCount - (urlLength -23) 
        }
        else    { 
            charCount = charCount + (23- urlLength) 
        }
    }
}
if(charCount > 280)
    return false
else
    return true

Validate Customer's Twitter Handle Script

This script validates whether the agent's response begins with the @mention of the customer's Twitter handle.

You must add this script as a validation rule to the Message object (child of Service Request object). You must also add a validation message that's displayed to the agents when their Twitter response is greater than 280 characters.

Use the following code as an example:

//Validation logic
//For channel other than social ignore
if(ChannelTypeCd !='ORA_SVC_SOCIAL')
    return true
//For draft ignore
if(StatusCd == 'ORA_SVC_DRAFT')
    return true
//For message other than response ignore
if(MessageTypeCd != 'ORA_SVC_RESPONSE')
    return true
//Get the last social customer entry
def vo = newView('SrMessageVO')
def vc = newViewCriteria(vo)
def vcr = vc.createRow()
def vci1 = vcr.ensureCriteriaItem('MessageTypeCd')
vci1.setOperator('=')
vci1.setValue('ORA_SVC_CUSTOMER_ENTRY')
def vci2 = vcr.ensureCriteriaItem('ChannelTypeCd')
vci2.setOperator('=')
vci2.setValue('ORA_SVC_SOCIAL')
def vci3 = vcr.ensureCriteriaItem('SrId')
vci3.setOperator('=')
vci3.setValue(ServiceRequest?.SrId)
vc.insertRow(vcr)
vo.appendViewCriteria(vc)
vo.executeQuery()
def lastCustEntry=vo.first()
//Get the channel via
def channelViaList=lastCustEntry.channelCommunication
def channelVia = channelViaList.first()
// Using inbound object id as post id, find the social post
def postId = channelVia.InboundObjectId;
def key = key(postId);
def socialPostVO = newView('SocialPostVO')
def socialPosts = socialPostVO.findByKey(key, 1)
// do nothing if the social post is not found
if (socialPosts == null || socialPosts.size() == 0) { 
    return true
}
// use the first social post
def socialPost = socialPosts[0];
def networkType = socialPost.PostChannelCd
//do nothing if other than twitter 
if(networkType != 'TWITTER')    { 
    return true
}
//If message content is not having twitter handle as prefix then error out.
def twitterHandle = '@' + socialPost.PostUser + ' '
if(MessageContent!= null && !startsWith(MessageContent.toString(),twitterHandle))   {
  return false
}
return true; 

Map Social Post Tags Script

Tags associated with social posts in Social Cloud can be sent to B2B Service. These tags aren't displayed in the application, but can be used in Groovy scripts. This script maps social post labels in Social Cloud to social post tags in B2B Service. Agents can use these tags to take appropriate actions on the SR.

For example, use the following code to set the SR severity to SEV1 when the social post is tagged as urgent:

// do nothing if there are no channel vias
if (!channelCommunication.hasNext())   { 
   return; 
}

// use the first channel via
def channelVia = channelCommunication.next();

// do nothing if the channel via is not a social channel type
if (channelVia.ChannelTypeCd != 'ORA_SVC_SOCIAL')   { 
   return; 
}

// using inbound object id as post id, find the social post
def postId = channelVia.InboundObjectId;
def key = key(postId);
def socialPostVO = newView('SocialPostVO');
def socialPosts = socialPostVO.findByKey(key, 1);

// do nothing if the social post is not found
if (socialPosts == null || socialPosts.size() == 0)   { 
   return; 
}

// use the first social post
def socialPost = socialPosts[0];

// iterate over tags on the social post
def socialPostTags = socialPost.SocialPostTags;

while (socialPostTags.hasNext()) {
   def tag = socialPostTags.next();

   // One example: Set the SR Severity to SEV1 if social post is tagged with "urgent"
   if (tag.Tag == 'urgent')   { 
      setAttribute('SeverityCd', 'ORA_SVC_SEV1'); break; 
   }
}