Chatbot Connector Services


 

The service allows Syniverse Cloud messaging customer to leverage SCG (Syniverse Communication Gateway) message delivery channels and provide connectivity to external entities which expose messaging APIs and for which this service has a corresponding API module (or plugin) in place.

Syniverse Connector Service

The Syniverse Connector service provides Customers Chatbot Service accounts hosted on Cloud platforms a dedicated connector that allows them to create and enable a Syniverse messaging channel for their Bot services to communicate with their end-users.

The service will provide REST endpoint “connectors” where the user will be able to do CRUD operations for its connectors. The connector entity will contain configuration information needed for the corresponding service to function.

 

SCG_CONNECT_DEFAULT_CONVERSATION_IDLE_TIMEOUT (2 * 60)

After this time with no MO the conversation will be considered finished and will be closed. Subsequent message from the same user will open a new conversation.

Connector Service Integration

Connector service is now available for the following services:

  • MS Azure Cloud Connector
  • Google DialogFlow Connector
  • Amazon Lex

The connector service is able to translate session-oriented APIs like the Direct Link into paging-oriented APIs by emulating session behavior based on a Syniverse Sender ID, end-user contact (MDN) and time.

The service can also be used with a wide range of Syniverse Messaging Channels that are IP-based but also can be used on SMS services.

Syniverse Messaging Channels for Connectors

The Syniverse Messaging channels that can be leveraged on the Syniverse connector service include:

  • SMS
  • Facebook Messenger
  • RCS
  • MMS
  • WeChat

Prerequisite to using the Syniverse Connector service

  • Syniverse Cloud Messaging Account with a subscription to Voice and Messaging service (https://developer.syniverse.com )
  • A valid Dedicated Sender ID (Can be a Shortcode, Longcode, or toll-free number. Can also be a Sender ID configured for RCS, WeChat or Facebook Messenger).

The service will consist of two major parts - SCG MO Handler and API MT Handler.

 

Creating a Connector service in SCG

Creating a MS Azure Chatbot Connector

 

In order to create the connector an active private SenderID  is needed. Once the senderId is available use following curl to create the connector:

curl -X POST  https://api.syniverse.com/scg-external-api/api/v1/connect/connectors H 'Content-Type: application/json' -H "Authorization: Bearer {Token}" 

-d '{"type":"AZURE_BOT_DIRECT_LINE","sender_id":"Uu4txaiKbAWjMN8427QEM2","credentials":"ZrVkDm7_F24.cwA.BEs.Sz0w9A3HT1jhIo67glktyW4wz73y6J_Hd810FP6eFTpQ","external_id":"Test123"}'

Where:

  • BOT type: AZURE_BOT_DIRECT_LINE
  • Sender ID: Uu4txaiKbAWjMN8427QEM2 (SMS-Capable Sender ID)
  • Credentials: Your MS Azure Bot Secret Key
  • External ID: Optional unique identifier

Response

You will receive a <ConnectorID> as response to a successful request.

Creating a DialogFlow Chatbot Connector

 

You can create a Google DialogFlow connector that can be used used with any applicable Syniverse Messaging channel.

 A Dialogflow account and Google Cloud platform credentials are required to creata and use this connector. Messages are received on the user’s device as a response to the request that was sent by the user. Conversations are created implicitly.To create a connector in the type field put “GOOGLE_DIALOG_FLOW” and in the credentials field put the content of the json file with the Dialogflow/GCP keys, properly escaped so can be put in JSON string. For example:

Please note that all quotes (") and all back slashes (\) in the key file content need to be escaped by a backslash, like this - \" or \\

Create a DialogFlow connector 

In order to create the connector an active private Sender ID is needed. Once the senderId is available use following curl to create the connector:

curl -X POST \ https://api.syniverse.com/scg-external-api/api/v1/connect/connectors\  -H 'Authorization: Bearer {Token}' \  -H 'Content-Type: application/json' \ 

-d '{"type":"GOOGLE_DIALOG_FLOW","sender_id":"cEeua7AU15nWb8c2o8TjLo","credentials":"{ \"type\": \"service_account\",\"project_id\": \"kolanator-9600e\",\"private_key_id\": \"de59b6b44e99ae45068ac0892a7657d46904bbab\",\"private_key\": \"-----BEGIN PRIVATE KEY-----\\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDBPBzgaldPc9n7\\nUdakd+2xsY0L7zQsw6B/EcmpOGMBBCNSM7wsbluQZK806L5s/Tp0dy15r1nvAFBE\\nMjfjd3jerf5F4RlOf+idwvnE7SitkGASMV9LuwgTdnk0d3yGibchdSTcTpsvCGog\\njHlXghGH2yAUz2DZLcZEIebtYXi9Z45g4/mrQahVPdI6+MIMW7rcD90ZcM6sa6eH\\njoKEK52l8QGLVyLFSdLeVfX1xfuwjdAXlKpHuRPY7G8NdPjcIO9RB7zc73myvRge\\nAiPQZAFIQFMkfWkf5YezUfLh+0VNQ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QrJOHjxyy85kPaXpP0rHaSCbq3GTS7\\noe6y4/+V7veqsE4p0GI74vzwRlXyiAGde9FRyeKkzQKBgA0W1Itb5gMjdHTdPsx+\\nfeef/99hI8GISSHVc1npNgrsOIOlHsOt//zMRLHPtJarZ3mKzKkSz4+VqPLbmlK5\\nIMMvcBmH9O9UAcoxWCG6bBn9XZ9PsWjtDnR6DWgMoh67NaiQ/UMXOz25Bp/ludN/\\nHbD1q8SOJKUDyAZqCxAMMlt5\\n-----END PRIVATE KEY-----\\n\", \"client_email\" : \"kolanator-9854e@appspot.gserviceaccount.com\", \"client_id\": \"112680765748998725783\",\"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\"token_uri\": \"https://oauth2.googleapis.com/token\",\"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/kolanator-9600e@appspot.gserviceaccount.com\" }", "external_id":"my-df-to-rcs-connector"}'

Where:

  • BOT type: GOOGLE_DIALOG_FLOW
  • Sender ID: cEeua7AU15nWb8c2o8TjLo (RCS-Capable Sender ID)
  • Credentials: Your GCP/Service account credentials
  • External ID: Optional unique identifier

Response

You will receive a <ConnectorID> as response to a successful request.

Creating an Amazon Lex Chatbot Connector

Create your Amazon Lex Chatbot and credentials

Create the SCG Connector for Amazon Lex

In order to create the connector an active private Sender is needed. Once the senderId is available use following curl to create the connector:

curl -X POST \

  https://api.syniverse.com/scg-external-api/api/v1/connect/connectors \ -H 'Content-Type: application/json' -H 'Authorization: Bearer {Token} \

  -d '{

    "external_id": "lex-bot",

    "type": "AMAZON_LEX",

    "sender_id": "DXPG1tUIDAGhb3H7CECdXi",

    "credentials": "{\"accessKeyId\":\"AKIB236OJSYDXOYS44UW\",\"secretKey\":\"Qh6nZHoFcVZ+bAp/LTsLUn3FEXeM8CTH6HlQg4vE\",\"region\":\"us-east-1\",\"bot\":{\"name\":\"TestGreeter\",\"alias\":\"Testing\"}}"

}'

 

Note that once your Sender ID has been configured for your Bot service, a MO Handler in the Sender ID properties will be changed to <SCG_CONNECT>. This means that all MO messages to the Sender ID will be forwarded to your BOT. It is therefore recommended that your Sender Address is dedicated to this service and not shared with any other application that is required to receive MO (Mobile Originated) messages

 

Interacting with your Bot

  • Send a MO (Mobile Originated) message to your Sender Address which will be passed to your BOT
  • If your BOT responds, the messages will be delivered to the Mobile device

Other activities you can invoke on the connector service

  • List a Connector
curl -X GET https://api.syniverse.com/scg-external-api/api/v1/connect/connectors/<ConnectorID> -H "Authorization: Bearer {Token}"
  • List all your Connectors
curl -X GET https://api.syniverse.com/scg-external-api/api/v1/connect/connectors -H "Authorization: Bearer {Token}"
  • Update a Connector
curl -X POST https://api.syniverse.com/scg-external-api/api/v1/connect/connectors/<ConnectorID> -H 'Content-Type: application/json' -H "Authorization: Bearer {Token}" -d '{"sender_id":"my-updated-sender-id","credentials":"update-credentials","external_id":"changed-id-assigned-by-me","version_number":"1"}
  • Delete a connector
curl -X DELETE https://api.syniverse.com/scg-external-api/api/v1/connect/connectors/<ConnectorID> -H "Authorization: Bearer {Token}"

For more information on the API endpoints for the Connector service, please visit our API reference page on the Developer community portal

FAQ

 

  • Q: How many messages per sec can the service support?
  • A: Default throughput for a connector service is 30 MPs.

 

  • Q: Can I configure multiple sender IDs for my BOT service?
  • A: Yes, however a Sender ID can only be assigned to 1 Connector

 

  • Q: How many connectors can I create
  • A: You can create as many connectors as you want. However, please note that each connector can only have one unique Sender ID

 

 

For more information on how to get started with SCG connector service, please contact your account representative.