Using the Unica Interact Outbound Gateway for IBM Universal Behavior Exchange

To use the Unica Interact Outbound Gateway for IBM Universal Behavior Exchange, you must configure Unica Interact, UBX, and the gateway.

Use the following configurations as an example for your configuration.

If you use UBX as an outbound channel, Unica Interact acts as publisher type of endpoint, which publish events to UBX. From UBX these events can be sent to subscriber.

Before you begin the configuration, request for outbound access to host machine. You need net access to be enabled for the host machine.

Registering endpoints and events in UBX

  1. From UBX, navigate to the EndPoints tab. Click Register new endpoint to get an auth key. The auth key generated from UBX should be used for publisher endpoint and adding event. For the subscriber endpoint, the new auth key should be generated from UBX. Make note of the key.
  2. Register your publisher endpoint.
    1. Open the REST API client tool.
    2. Select the method as PUT.
    3. Pass the headers as
      Content-Type : application/json              
      Accept-Charset : UTF-8                
      Authorization : Bearer 520301d7-7855-4ea7-b19d-0b395c1e6ae4 
      (authKey generated in UBX)
    4. Pass the URL as
      URL: <protocol>://<hostname>/<other_information>
    5. For the body, pass the appropriate name for the publisher endpoint.

      For example:

      
      {    
          "name":"Interact_Publisher",    
          "description":"Endpoint for server created on 30thJan",   
          "providerName":"IBM",    "url":"",   
          "endpointTypes":{       
              "event":{        
              "source":{               
                 "enabled":true           
              }        
          }    
      },   
      "marketingDatabasesDefinition":{       
          "marketingDatabases":[           
            {               
                "name":"IDSync",               
                "identifiers":[                   
                  {                
                "name":"interactprofileid",           
           "type":"INTERACTID"                   
              }               
            ]           
          }      
         ]
      } 
      }
  3. Register your event. Make note of the [Event] code passed in body. This needs to be mapped in the ubxContentMapping.properties file. This is case sensitive.
    1. Open the REST API client tool.
    2. Select the method as POST.
    3. Pass the same headers you used for your endpoint in the previous step.
    4. Pass the URL as
      URL: <protocol>://<hostname>/<other_information>
    5. For the body, pass the appropriate name for the event.

      For example:

      {    
         "name": "recommendedOffer",    
         "description": "recommended
            contact frm UBX",    "code":
            "recommendedOffer"}
      Note: The Event code that is passed must be mapped in the ubxContentMapping.properties file. The event code is case sensitive.
  4. Add the subscriber endpoint.
    1. Open the REST API client tool.
    2. Select the method as PUT.
    3. Pass the same headers you used for your endpoint in the previous step.
    4. For registering the subscriber endpoint, create a new auth key in UBX.
    5. Pass the URL as
      URL: <protocol>://<hostname>/<other_information>
    6. For the body, pass the appropriate name for the publisher endpoint.

      For example:

      {    
         "name":"UBX_Subscriber",    
         "description":"UBX_Subscriber for Subscribing Events ",   
         "providerName":"IBM",   
         "url":"http://ubxeventconsumer.mybluemix.net/ubxeventconsumer",   
         "endpointTypes":{       
            "event":{           
              "source":{               
                "enabled":true            
              },           
            "destination":{               
              "enabled":true,               
               "url":"http://ubxeventconsumer.mybluemix.net
                /ubxeventconsumer",                        
            }        
         }    
      },   
      "marketingDatabasesDefinition":   {        
        "marketingDatabases":[           
          {               
             "name":"IDSync",               
             "identifiers":[                   
                {               
             "name":"interactprofileid",           
           "type":"INTERACTID"                   
               }               
            ]            
         }        
       ]
      }
  5. After adding publisher and subscriber endpoints and event, you must subscribe the events from the publisher to the subscriber in UBX .
    1. In UBX, click Subscribe to events on the Events tab.
    2. Select the event and destination.
    3. Click Subscribe.

Configuring Unica Interact and the gateway

  1. Under the Interact folder, in the httpConnectionConfig.properties file, specify the timeout.
    For example:
    connectTimeoutMs=180000
    When OMO is configured to use a HTTP connection, a HTTP proxy can be configured optionally with authentication between Interact and the endpoint. To enable the proxy for outbound gateways, update the values of following properties.
    • proxyHost=<IP address of the proxy server>
    • proxyPort=<Listening port of the proxy server>
    • targetUsername=<username for connecting to the proxy server. leave blank if no authentication required>
    • targetPassword=<password for connecting to the proxy server. leave blank if no authentication required>
    For example:
    
    authKey=912586bf-190d-48f9-8488-26f1bf532ef3 
    [Auth Key used to register publisher endpoint and event in UBX]
    interactProfileIdFieldName=interactprofileid 
    [Field name from the ubxContentMapping.properties file]
  2. Update the values for interactprofileid and eventName in the ubxContentMapping.properties file.

    You can Pass Event Name in three formats: when the value is in double quotes, it is a static value; when the value is in the offer.offerAttributeName format, it maps to the offer attribute offerAttributeName; and when the value is in the profile.profileAttributeName format, it maps to the profile attribute profileAttributeName. The Event Name value should match the code used to register the event in UBX . This is case sensitive.

    For example:

    eventName="abandoned_shopping_carts"
    eventName=offer.Card
    eventName=profile.EMAIL
  3. Add a channel under the Interact | triggeredMessage | channel configuration property.
  4. Define the same channel in design time under Campaign | partitions | partition [n] |Interact | outboundChannels
  5. Restart the application server.
  6. Create a triggered messages rule with an event name and that uses the channel you added in the previous steps.
  7. Deploy the interactive channel.
  8. From the API Test client, start the session for interactive channel where triggered message rule is configured and the post event which triggers the offer to UBX.