Jump to: navigation, search

Sample Business Process: Twitter BP

Twitter BP is a sample Business Process that is supplied on the Genesys Social Messaging Management product CD.

There is also a sample Twitter BP with iWD.

Enable compliance with Twitter

Starting with, Cloud API Driver for Twitter can be configured to meet the Twitter compliance requirement of processing the Tweet delete updates as they arrive from the Twitter API.


Ensure the ComplianceId option is available in Twitter interaction attributes. If the option is not available, create it using the following steps:

  1. Create a new interaction attribute in Configuration Server\<your tenant>\Business Attributes\Interaction Attributes .
  2. Enter the following values:
    • Name as ComplianceId
    • Display name as ComplianceId
    • Description as Twitter ComplianceId
  3. In Annex, define, settings\is-sortable = true


  1. Open the Twitter Outbound Strategy
  2. Open Variables list and add a new variable TwitterComplianceId with type STRING.
    Variables list
  3. Find the SendMessage call from ExternalServiceRequest block and open it.
  4. Navigate to the Result tab and add a new assignment, TwitterComplianceId variable to the ComplianceId field of ESP request execution result, and click OK.
  5. Open the Function block and add an update function of ComplianceId User Data field to the TwitterComplianceId variable.
    Update Function
  6. Click OK.

In Release 8.1.0

Twitter BP performs the following simple processing, using two strategies:

  1. Twitter Inbound Strategy
    1. Filters out tweets that already exist as interactions in the Universal Contact Server (UCS) database
    2. Creates an interaction in the UCS database
    3. Sends a request to Classification Server to screen and classify the interaction
    4. Delivers the interaction to an agent, along with the results of the screening and classification
  2. Twitter Outbound Strategy dispatches a reply from the agent to Digital Messaging Server, for delivery to Twitter.

In Release 8.1.1 and Later

Twitter BP uses the following strategies:

  1. Twitter Inbound Strategy
    1. Initializes the required variables.
    2. Ensures that the interactions will be delivered to agents in the order they were created.
    3. Checks whether the interaction already exists in the UCS database and, if not, creates it.
    4. Associates the interaction with the correct thread.
    5. Creates contacts in UCS.
  2. Twitter Classify-Screen Strategy performs classification and screening, and attaches the resulting Actionability and Sentiment attributes to the interaction.
  3. Twitter Influence Calculation Strategy calls up the Klout service and attaches the appropriate keys showing the influence values.
  4. Twitter Calculation Strategy processes all previously-attached classification and screening keys and attaches the keys desktop_sentiment, desktop_actionable, and desktop_expand, which the desktop uses in presenting the interaction in its user interface.
  5. Twitter Agent Delivery Strategy delivers the interaction to the agent desktop.
  6. Twitter Outbound Strategy dispatches a reply from the agent to Digital Messaging Server, for delivery to Twitter.

In Release 8.1.2

  • The Twitter BP now processes errors returning from Twitter when send message, submit post, or submit comment requests are sent to the Twitter driver. If an error is returned, the Twitter BP will make multiple consecutive attempts to send these requests to the driver until either the messages have been successfully posted or the limit for the number of attempts has been reached.
  • UCS implements threading based on the Twitter inReplyToStatusId attribute (called _twitterInReplyToStatusId in interaction data). This attribute is not presented in direct messages; because of that every direct message starts a new thread in UCS. The outbound strategy now makes sure that the correct threading info is saved in UCS.
  • When the SendMessage ESP request is sent, the StatusId of the posted message is returned by the Twitter API. This StatusId is then saved in UCS for the current outbound interaction. This information will be used later by the inbound reply interaction to thread them together. The inbound Twitter strategy takes care of the message threading in UCS by checking the contact and looking for an interaction whose StatusId is equal to inReplyToStatusId (if it exists) of the current inbound interaction. If a matching interaction is found, the inbound interaction is threaded as a child of the matching interaction.

In Release 8.1.201

  • The new Twitter Outbound Init Queue acts as a virtual queue that provides a temporary placeholder for an outbound interaction for the plug-in while agents work on their content. If the plug-in crashes, the interaction remains in that queue and could potentially be routed to a custom supervisor's desktop, for example. The interaction sits in the strategy for one month (60x60x24x31 sec) and is terminated, but the logic of this strategy can be extended.

In Release 8.5.1

  • Twitter Outbound Strategy—A Function is added that updates user data with a key-value pair. The key is the message ID of the outbound interaction, and the value represents the Twitter status ID of the interaction. This makes it possible for the agent to delete outbound Tweets.
  • Twitter Agent Delivery Strategy—Target objects, rather than delivering to a specific group, use the skill-based expression 1=1, meaning the interaction is delivered to any agent who has the capacity to handle social media interactions.
This page was last edited on January 12, 2022, at 11:46.
blog comments powered by Disqus