Suivez votre progression
Accueil Trailhead
Accueil Trailhead
Durée estimée

Set up an Integration Flow

Anypoint Platform lets you design, build, and manage both APIs and integrations. For this project, use Flow Designer, which is a low code, web-based IDE to build the integration flow. Get started.

  1. Log in to your Anypoint Platform trial account.
  2. From the Anypoint Platform homepage, navigate to Design Center.
  3. Click Create then Create new application.
  4. For Project name, enter Order to cash automation.
  5. Click Create.
  6. For Trigger, select Salesforce Connector.
  7. For Operation, select select Subscribe Topic.
  8. Click Next.
  9. For Target, select Twilio Connector.
  10. For Operation, select Send Message.
  11. Click Done.

Flow Designer initial flow.

Now you have a canvas with three cards. When you open them, you see error messages. Here’s how to get rid of the errors and set up the Salesforce configuration.

  1. Open the Salesforce Connector card and click the link in the error message to set up the Salesforce configuration. Use these values:
    • Connection Type: Basic Username Password
    • Username: your Salesforce username
    • Password: your Salesforce password
    • Security Token: your Salesforce security token (To reset your security token follow these steps.)
  2. Click Test to be sure the connection is successful. If it fails, double-check your credentials and token.
  3. Click Save.
  4. Click Add Topic, enter ClosedOpps and close the card.
  5. Open the Twilio Connector card and click the link in the error message to set up the Twilio configuration. Use these values:
    • Username: Your Account SID (not your account username)
    • Password: Your Auth token (not your account password)
  6. Click Test to be sure the connection is successful.
  7. Click Save.
  8. Add the account SID in the Twilio Connector, then close the card.

Create Data Types

Different systems use different formats and fields to represent data. Since data passes through various NTO systems, create all the data types required for the project now. Here’s how:

  1. In the Project sidebar, click the + icon next to Data Types.
  2. The first data type determines what Salesforce is going to send. Name it Salesforce Opportunity.
  3. Use an example to define the data type by replacing the JSON text with this:
{
"Amount": 15000,
"Id": "0061U0000079dWXQAY",
"CloseDate": "2019-01-25T00:00:00.000Z",
"Name": "Dickenson Mobile Generators"
}

Notice that DataSense automatically parsed the fields from the example in the right sidebar. Click Save.

Next, repeat the above steps to create Order Information, Order Tracking, and Product Information data types using the example JSON text that follows.

The Orders API accepts Order Information data in this format.

Name: Order Information

Example:

{
     "OppId": "fsjf3439d993",
     "OrderAmount": 500000,
     "orderdate": "2018-11-13T11:15:45",
     "productInfo": {
         "productID": "CK111274",
         "category": "Small",
         "SKU": "CKS0",
         "productName": "Old School Classic Kicks",
         "inventory": 9999
      }
}

The Orders API returns order tracking information in this format when orders are placed.

Name: Order Tracking

Example:

{
 "OrderID": 50122,
 "TrackingNo": "Z34342211",
 "ETA": "2018-11-13T11:15:45"
}

This is the data format of the product information stored in the MySQL database.

Name: Product Information

Example:

[
 {
  "productID": "CK989603",
  "category": "Medium",
  "SKU": "CKS50",
  "productName": "Air Fly High Quality Sneakers",
  "inventory": 22333
 }
]

Great going! You’ve created a baseline flow and defined the data types that the NTO systems use. These data types define how the Order data is stored/exchanged within different systems at NTO. Now that you have all of this defined, you need to get product info like SKUs and inventory information before you place an order. In the next step, use the database connector to get product information from a MySQL database where NTO stores its product information.

We won’t check any of your set up. Click Verify Step to go to the next step in the project.

Resources