Adding a new card in Trello when a new case is added in Salesforce

Learn how easy it is to create an event driven flow that adds a new card in Trello when a new case is added in Salesforce.

Note: This tutorial assumes that you have signed up for free or trial accounts for Salesforce and Trello, or that you have business accounts.

Scenario:

A food manufacturing company is using Salesforce for their CRM. A new case is created when customers phone, email, or send a complaint via the web. For tracking the case you want to create a card in Trello, to make sure you never forget to follow up with that new case again!

Figure 1. Create a new Trello card for a new Salesforce case
Create a new Trello card for a new Salesforce case

(Click image to view full size)

First, find or create everything you need:

  1. Obtain an App Connect on IBM Cloud® service. You can use an App Connect service that you already have or can sign up for App Connect.

    In this example, we use a new free App Connect - Lite plan service.

  2. Obtain account details for connecting App Connect to your applications(If you haven't already connected App Connect to your applications):
    • The name and password of your Salesforce and Trello accounts.
      Tip: If you want to create a free test account in Salesforce rather than use your business account, make sure that you register for a Developer account from this URL: https://developer.salesforce.com rather than a Trial account. If you connect to App Connect with a Trial account, the Salesforce events do not work.

Next, create your flow:

Using the IBM App Connect Designer authoring experience, you can create your flow from a template, or from scratch if you want to explore the steps taken to create a flow.

Creating the flow from the template

This enables you to create the flow immediately, and then select each node in the flow to validate the node and select the application accounts that you want to use. Search for the template name in your IBM App Connect / Templates view.

Restriction: Some templates are only available in App Connect on IBM Cloud
Figure 2. Tile for template, Create a new Trello card for a new Salesforce case
Template tile

Template name: "Create a new Trello card for a new Salesforce case"

Creating the flow from scratch

This helps you to learn the sequence of steps used to create the flow, and to examine the nodes and fields as you go.

Figure 3. Salesforce to Trello flow diagram
Salesforce to Trello flow diagram
  • In App Connect Designer, complete the following steps:
    1. From the Dashboard, click New > Event-driven flow.

      (If you navigate away from the flow at any stage, the flow is saved as a draft flow that you can complete at another time.)

    2. Enter a name that identifies the purpose of your flow, for example: Create a new Trello card for a new Salesforce case.
    3. Select Salesforce as your first application (source).
    4. Select New Case as the Salesforce event.
      Figure 4. Selecting the Salesforce / New Case event
      Select New Case

      (Click image to view full size.)

    5. If you haven't already connected a Salesforce account, click Connect and follow the instructions to allow App Connect to connect to your Salesforce account.
    6. Select Trello as your second application (target).
    7. Select Add card to list as the Trello action (from under Trello cards).
    8. If you haven't already connected to a Trello account, click Connect and follow the instructions to allow App Connect to connect to your Trello account.
    9. Select the team, board, and then the list that you want to add the new card to.
      Figure 5. Select the team, board, and then the list that you want to add the new card to.
      Select the team, board, and then the list that you want to add the new card to.
    10. For each field that you want to populate to the Trello card, click the Insert a reference icon , then select the Salesforce field that contains the data that you want to transfer to Trello;
      Figure 6. Salesforce case to Trello mapping
      Salesforce case to Trello mapping

      (Click image to view full size.)

    11. Click Start flow on the toolbar, then click Dashboard to exit the flow.

      Your flow is displayed on your Dashboard and is listening for your trigger ; the addition of a new case in Salesforce.

      Figure 7. Flow tile showing the flow running
      Flow tile showing the flow running.

      (Click image to view full size.)

Finally, test your flow:

  1. Log in to Salesforce with the account that you configured in App Connect, and create a new case.
    Figure 8. Create a case in Salesforce
    Create a case in Salesforce

    (Click image to view full size.)

    You must complete the Subject field and other mandatory parameters required by Salesforce to create a new case.

  2. A short time after you save the new Salesforce case, the flow tile on the App Connect Dashboard shows a new notification with a tick icon . Click the tick icon to see the ‘Last successful run’ message.
  3. Figure 9. Flow tile showing the last successful run message
    Flow tile showing the last successful run message.

    (Click image to view full size.)

  4. Log in to Trello and check the list. A new card about the new Salesforce card should be added in Trello. Your flow will continue to create cards in Trello for every case that's added to Salesforce.
  5. Figure 10. New card in Trello
    New card in Trello

    (Click image to view full size.)

    You might choose to update the flow to perform actions on other apps with additional nodes, apply logic-based decisions to actions, or add value by using Watson™ for cognitive enrichment of data.