Creating an event-driven flow to retrieve SAP data to enhance actions on SaaS apps
Learn how easy it is to create an event-driven flow in App Connect Designer to retrieve OData resources from SAP and use the SAP data to enhance actions on SaaS apps.
Before you begin
First, find or create everything you need:
- 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
In this example, we use a new free App Connect; Lite plan service.
- The email address and password of your Eventbrite account.
- The name and password of your Salesforce account. 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.
- Prepare SAP OData connectivity for use with App Connect Designer, as described in How to use IBM App Connect with SAP (via OData).
- The email address and password of your Asana account.
About this task
This topic gives an example of creating an API flow in App Connect Designer to create OData resources in SAP and perform actions on SaaS apps, based on the following scenario.
A company is using Eventbrite for their event management tasks. When a new order is created in Eventbrite, they want App Connect Designer to automatically retrieve related booking data from SAP in their private network, create a new order in Salesforce.com, and create a task in Asana for their team to handle the new order.
Rob, an integration developer, configures an event-driven flow in App Connect Designer to implement the scenario. Rob doesn't need any experience with SAP, only getting required SAP OData configuration details from his SAP admin. Rob exploits App Connect's 'configuration without coding' approach to create and then start the event-driven flow in a matter of minutes, thereafter processing each new order created in Eventbrite.
Time required: If you have already connected SAP, Salesforce, and Asana to App Connect, the steps to create and test the integration flow in this tutorial should take only a few minutes.
- Log in to App Connect Designer.
- On the Dashboard, click .
- Complete the following steps.
As you progress, App Connect automatically saves your changes. 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.
- Enter a name that identifies the purpose of your flow. For example: Add Eventbrite order to Salesforce
as the event that is to trigger the flow.If you haven't already connected an Eventbrite account, click Connect and follow the instructions to allow App Connect to connect to your Eventbrite account.
- Click the (+) and then select the SAP retrieve action that you want to use to get
related booking data from SAP
- This tutorial shows the use of a SAP retrieve action, but could have used a SAP create action just as easily. For an example of using a SAP create action, see the tutorial Creating an API flow to create SAP OData resources.
- If you haven't already connected to SAP, and started the IBM® Secure Gateway client for use with SAP, you won't see any SAP actions. Click Connect and follow the instructions to allow App Connect to connect to your SAP system.
- Before using the SAP connection in App Connect Designer, start the IBM Secure Gateway client that you configured for use with SAP. After starting the client, the App Connect Catalog page should list the SAP objects and their actions that you can use. If you start the IBM Secure Gateway client after logging in to App Connect Designer, you can refresh the App Connect Catalog page to see the list of SAP objects and their actions.
- Configure the conditions to be used by the SAP retrieve action to get the one record
for the booking data. For each condition needed, select a SAP property and then configure the condition value that the property must equal for the condition to be true; for example, if you want to retrieve the record with the SAP property Passenger Name equal to the Eventbrite source field Attendee name:
- Select the SAP property Passenger Name
- In the condition value field, type or select the Eventbrite source field Attendee name.
- Click the (+) and then select
the next action to be performed.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.
- Configure values for the required fields, and any optional fields that you want to use
when creating a new Salesforce order
- For *Contract ID, type the ID value of a specific contract (to use that ID for all orders handled by this flow)
- For *Account ID, select the SAP BookingCollection field Agency No (to use the value retrieved from SAP)
- For *Order Start Date, select the SAP BookingCollection field Booking date
- For Status, enter the value
- Enter a name that identifies the purpose of your flow.
- Click the (+) and then select
as the next action to be performed.If you haven't already connected an Asana account, click Connect and follow the instructions to allow App Connect to connect to your Asana account.
- Select the Asana project in which to create new tasks.
- Configure a value for Task name.
You can type text and select fields from the Eventbrite event and the other actions. For example:
New Eventbrite order [Order ID] for [Passenger Name] added to Salesforce order ID [Order ID], Start date [Booking date]
where […] indicates fields selected from Eventbrite, SAP, and Salesforce.
Start the flow
- From the banner, open the options menu [⋮] and click Start flow.
Then click Dashboard to exit the flow. Your flow is displayed on your Dashboard and is listening for your event – the addition of a new order in Eventbrite.
Congratulations, you have created a flow so that every time a new order is created in Eventbrite, data is retrieved from SAP and used to enhance the creation of an order in Salesforce and a task in Asana.
What to do next
To test your flow, create a new order in Eventbrite, as follows:
- Use Eventbrite to create a new order for an event managed by the account that you configured in App Connect.
- Add values for Company, First Name, Last Name, and Email, and then complete the registration for the new order.
- Log in to Salesforce with the account that you configured in App Connect, and then select the Order tab. You should see a new order that App Connect has created for the Eventbrite registration. If you view the detail for the Salesforce order, you can see that Account name has the value assigned from the SAP BookingCollection field Agency No, and Order Start Date has the value assigned from the SAP BookingCollection field Booking date.
- Log in to Asana with the account that you configured in App Connect, and then display the board that you also configured. You should see the new task that App Connect created for the Eventbrite registration, using the Passenger Name and Booking date values retrieved from SAP and other values from Eventbrite and Salesforce that you configured in the flow.