The 3rd party zelle Real Time Payments service is not operational at the moment. This repository will not be updated. We will keep the repository available for folks interested in some of the technical details.
In this code pattern, we will use IBM Cloud services to create a Node.js web application featuring a chatbot to send payments and provide account information. The Real-Time Payments service is used to manage user accounts and recipients, and to initiate payments. The Watson Assistant service will be used to create a dialog for the chatbot, which will process user's requests. The Natural Language Understanding service will enhance the chatbot capabilities to identify entities.
When the reader has completed this pattern, they will understand how to:
- Create a chatbot dialog with Watson Assistant and Natural Language Understanding
- Setup Real-Time Payments service to manage user's accounts and recipients, and process payments
- Integrate chatbot with Real-Time Payments service to process payments and provide user information
- The user accesses the chatbot through the real-time payments web application
- Watson Assistant takes in natural language input and breaks and maps it to intents and entities that it has been trained for
- User input is processed with Natural Language Understanding. The context is enriched with detected entities and keywords
- Real-Time Payments processes the user's request such as sending payments, providing account data, or information on transactions
- Watson Assistant uses the data/response from the Real-Time Payments service to provide an informative response
- The response is delivered to the user through the chatbot in the web application
- IBM Cloud Account: The home of 170+ unique services.
- Real-Time Payments: The Real-Time Payments service leverages IBM Financial Transaction Manager's sophisticated capabilities to manage participants, tokens and receivers, to initiate payments and payment requests and to view the status of the payments hub.
- Watson Assistant: Build, test and deploy a bot or virtual agent across mobile devices, messaging platforms, or even on a physical robot.
- Natural Language Understanding: Analyze text to extract meta-data from content such as concepts, entities, keywords, categories, sentiment, emotion, relations, semantic roles, using natural language understanding.
- Node.js Node.js is an open-source, cross-platform JavaScript run-time environment that executes JavaScript code server-side
Use the Deploy to IBM Cloud
button OR create the services and deploy the application locally.
- Press the above
Deploy to IBM Cloud
button and then click on Deploy. Provide aName
,Region
andOrganization
for the toolchain and the application.
- In Toolchains, click on
Delivery Pipeline
to watch while the app is deployed. The logs can provide details on the deployment of the application or any issues.
- Navigate to IBM Cloud dashboard to find your application. You can find app details and and services created and configured for the application
You will need to configure Watson Assistant prior to launching the app.
Follow these steps to setup and run this code pattern. The steps are described in detail below.
- Clone the repo
- Create IBM Cloud services
- Configure Watson Assistant
- Configure .env file
- Run the application
- Deploy to IBM Cloud using CLI
Clone the real-time-payments-chatbot
locally. In a terminal, run:
$ git clone https://github.com/IBM/real-time-payments-chatbot.git
Create the following services:
Launch the Watson Assistant tool by opening the service and choosing Launch Tool
.
Click on the Workspaces
tab. Use the import icon button on the right to import the workspace json.
Choose the workspace.json
in resource/workspace.json and click import.
Find the Workspace ID by clicking on the context menu of the new workspace and select View details. Save this ID for later.
Create a .env
file in the root directory of your clone of the project repository by copying the sample .env.example
file using the following command:
cp .env.example .env
You will need to update the credentials with the IBM Cloud credentials for each of the services you created in Step 2.
The `.env` file will look something like the following:
```none
# Real-time Payments
CRED_REAL_TIME_PAYMENTS_URL=https://ftm-proxy.mybluemix.net
CRED_REAL_TIME_PAYMENTS_ACCESSTOKEN=
# Watson assistant
CONVERSATION_USERNAME=
CONVERSATION_PASSWORD=
WORKSPACE_ID=
//Natural Language Understanding
NLU_USERNAME=
NLU_PASSWORD=
```
a. Install the dependencies your application need:
npm install
b. Start the application locally:
npm start
c. Test your application by going to: http://localhost:3000/
- Register a user and create a token for the user such as phone number or email
- Register another user and create a token for the user such as phone number or email
- Login as the first user and add the second user as a contact using their 'token'
- Open the chatbot by clicking the chatbot button on top
- Tell the bot to send money to your contact
Update the manifest.yml
file in the folder and replace with a unique name for your application. The name that you specify determines the application's URL, such as your-application-name.mybluemix.net
. Additionally - update the service names so they match what you have in IBM Cloud. The relevant portion of the manifest.yml
file looks like the following:
```yml
applications:
- name: real-time-payments-chatbot
command: npm start
path: .
memory: 256M
disk_quota: 1024M
services:
- Real-Time-paymentsM
- Natural Language Understanding-payments
- Watson Assistant (formerly Conversation)-payments
```
Then use the IBM Cloud CLI to deploy the app to IBM cloud
bx push
- To troubleshoot your IBM Cloud application, use the logs. To see the logs, run:
cf logs <application-name> --recent
This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.