Giter Site home page Giter Site logo

ballerina_connector_use_cases's Introduction

ballerina_connector_use_cases

This repo contains the Ballerina code for the implementation of Use Case 3: Automating a Donation Submission Process Using Salesforce and Twilio.

Prerequisites

Salesforce configurations

Twilio configurations

  • Create a Twilio account and generate the necessary tokens - https://www.twilio.com/
  • Add a verified phone number to receive text messages.
  • Generate a trial number for your account to send text messages.

Ballerina

  • Use Swan Lake Preview 1 version of Ballerina.

ballerina update ballerina dist list ballerina dist pull slp1

  • Create a Ballerina project

ballerina new connector_use_cases // new project ballerina add use_case_3 // new module

  • Or instead of creating a module, clone this repository in to the connector_use_cases project folder you just created.

  • Add the contents in ballerina.conf.copy file to your ballerina.conf file. Make sure to edit the conf file to add the relevant tokens and URLs obtained from Salesforce and Twilio. ballerina.conf.copy is merely an edited copy of my ballerina.conf file to be used for reference.

  • Run the project with the following command:

ballerina run use_case_3

  • To activate the first workflow (i.e., create an account and opportunity in Salesforce with the given information, which is hard-coded in main.bal for the time being), run the following command in a different terminal: curl "http://localhost:9090/donationMgt/processDonation"

  • Check Salesforce to see the newly created Account and Opportunity under that account. The verified phone number will also receive a text message stating that the donation will be processed.

  • To activate the seconde workflow, go to Salesforce and click on the created (or any other) Opportunity and change the stage to Closed-Won. Now the verified phone number will receive a text message, which thanks and informs the user that the donation has been processed and accepted.

ballerina_connector_use_cases's People

Contributors

dakshitha avatar thishanilucas avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.