Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content
  • What are Request-Reply Maps and When Should I Use Them?


    Manoj Chaurasia

    Screenshot2022-11-05at12_41_13PM.thumb.png.892ec14288772d18277efbc78fdece16.png

    Most integrations start with a query to a source system that returns some records for processing. This is great for synchronizing data between two or more systems, but there are other scenarios that don?t fit that mold. Sometimes you just want to retrieve a particular record when you need it. A salesperson may need real-time access to product inventory data, for example. Or you may have a system that can send new or changed data as an outgoing webhook. What do you do then?

    As usual, the Connect capability of TIBCO Cloud Integration has you covered. In addition to standard query integrations, it has a request-reply method that handles the other scenarios. Continue reading to learn how it works.

    Let?s use a simple example of retrieving real-time data from another system. Suppose we manage an online sporting goods store and want to promote a specific category of products when a customer logs in. That information exists in our CRM system, and we want to call out from the eCommerce system to get it.

    Before we begin, we need to change our security settings to give an external system access to our TIBCO Cloud Integration organization. Log in, navigate to the Connect capability, and choose Security from the More menu. Set an IP address range, check the box for Event Solution Access, and we?ll be ready to go.

    Screenshot2022-11-05at12_41_55PM.thumb.png.146c3f533ee04fe0ef74425e41d54ced.png

    First, we will create an Integration Event Solution and give it a name.
     

    Screenshot2022-11-05at12_42_02PM.thumb.png.79c3724b820cd84a665bf4ddbf9c91cb.png

    Then we?ll create a Request-Reply map and give it a name.
     

    Screenshot2022-11-05at12_42_09PM.thumb.png.cf6b0af24144639f80a04cfaf30f01e5.png
     

    Next, we?ll click the map name to open the map editor and start building the map. Start with a Wait for Request block.
     

    Screenshot2022-11-05at12_42_35PM.thumb.png.98fbe263d5e48473551b01d0cbac0721.png

    Open the block and select the Request tab. Then click the plus symbol to add a field. The eCommerce system knows customers by email address, so the request will have an email address field. It will look like this.

    Screenshot2022-11-05at12_42_51PM.thumb.png.a018935ac514339ec784d858396ea504.png

    Now we?ll add a connection for the CRM system. If you have a trial subscription, you should see a connection called Granite State CRM, which you can add to the map by clicking the Add Connection link on the left. If you're using your own CRM system, adapt the instructions below accordingly.

    Screenshot2022-11-05at12_43_12PM.thumb.png.61a8785735df16c32c27e3a7f8a4933f.png

    Next, we?ll build the map to get the information we want about the customer who are shopping on our site. Add a lookup block from the Granite State CRM connection and choose the CRM_Customer entity from the drop-down list on the right.

    Screenshot2022-11-05at12_42_44PM.thumb.png.3ecb3f9c009b43f48f84c789de7815b4.png

    Open the lookup block, choose the Lookup Criteria tab and click the plus symbol to add a criterion. Choose the Email field on the left.

    Screenshot2022-11-05at12_42_51PM.thumb.png.b1d1f10740f3d7d8d816b614f4918d18.png

    Now click the fx symbol under Value to open the formula editor. Select Wait for Request under Source and click the plus symbol next to the Email field in the center to add the formula for the email address that comes in through the request.

    Screenshot2022-11-05at12_43_04PM.thumb.png.b17e993803678d91a8ab9f3043b75c73.png

    Click OK to close the formula editor and navigate to the Field List tab. Check the boxes next to Category, Country, Email, First Name, Gender, and Last Name.

    Screenshot2022-11-05at12_43_12PM.thumb.png.faa6a15c8930859439fa8d9a8ac3f5c6.png


    Click OK to return to the map editor, then add a Build Reply block to the map. Open the block and navigate to the Fields tab. Open the Results list on the left and drag each of the fields over to the right.

    Screenshot2022-11-05at12_43_23PM.thumb.png.6ab0e361618abea6779c2cf98786fc4d.png

    Close the block and add a Send Reply block to the map. If we were building this for a production system, we would want to add logic to test the lookup result and construct a different reply based on whether there was a match, but we?ll skip that step here. Click Validate to make sure the map checks out. The result should look like this.

    Screenshot2022-11-05at12_43_32PM.thumb.png.76fb5586836d9567d437fba18892bbf3.png

    Click OK to save the map. As it saves the map, TIBCO Cloud Integration will automatically create a unique URL that an external system can use to send a request to the map. Open the map again and copy the URL displayed on the right side. We?ll use this to make our requests.

    Screenshot2022-11-05at12_43_41PM.thumb.png.5e81b278fdd4e8e891803a67212f49e8.png

    For this example, we?ll use Postman as a proxy for the eCommerce system. If you don?t already have it, you can get a free Postman account. Open the app and choose Post from the drop-down list. Then paste the URL for the map in the box.


    Screenshot2022-11-05at12_43_50PM.thumb.png.7388a22371378e565a10cfb5c48660b6.png

    Choose the Body tab under the URL, select the raw radio button and choose JSON from the drop-down list. Then paste the following in the box underneath. This is the email address of one of the customers in the Granite State CRM system that?s provisioned in trial organizations.

    Now click the blue Send button, and you should receive the following back.

    Screenshot2022-11-05at12_43_59PM.thumb.png.42d226efe10539c10b1959d2785ee3ca.png

    From the response, we can tell that Earl Wright likes fishing, so the eCommerce system can promote our fishing products to him, while it might promote camping or water sports to someone else.

    If you do not already have a TIBCO Cloud Integration subscription and you want to try request-reply maps for yourself, sign up for a free trial. When you first log in, spend 5 minutes going through the orientation guide, and then you?ll be ready to create your own request-reply maps.


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...