Adding an external data source to a data type (2024)

Adding an external data source to a data type

Scenario
Challenge Walkthrough
Detailed Tasks
1. Create a data object with an external data source
2. Map the response from the data source
3. Define the endpoint settings for the integration
4. Aggregate the responses from the data source
5. Configure the source data transform
6. Parameterize the data page to configure both service calls

Archived

7 Tasks

30 mins

Pega Platform 8.8 Pega Platform 8.7 (English) Pega Platform 8.7 (日本語) Pega Platform 8.7 (Español) Pega Platform 8.6 (English) Pega Platform 8.6 (Français) Pega Platform 8.6 (Deutsch) Pega Platform 8.6 (日本語) Pega Platform 8.4 (English) Pega Platform 8.4 (Français) Pega Platform 8.4 (Deutsch) Pega Platform 8.4 (日本語)

Visible to: All users

Intermediate Pega Platform 8.5 Data Integration English

This content is now archived and is no longer updated. Progress is not calculated. Pega Cloud instances are disabled, and badges are no longer awarded. Click here to continue your progress in the latest version.

Scenario

Requests for roadside assistance must identify the vehicle so that a service provider can prepare for the service call. For example, certain vehicles may require a flat-bed tow truck or a higher octane blend of fuel. To better prepare service providers for a service call, stakeholders want to ensure that users only enter a valid combination of make, model, and model year for a vehicle. After evaluating several possible sources for vehicle models, stakeholders decided to source this information from a US National Highway Traffic Safety Administration (NHTSA) web service available at https://vpic.nhtsa.dot.gov/api.

Replace the current simulated data source with an integration to source the model information for passenger cars and trucksusing a Representational State Transfer (REST) service provided by the NHTSA. Populate the D_VehiclemodelsList data page with NHTSA response data, based on the model year and make entered by the user.

Note: NHTSA data includes information on other types of vehicles, such as buses, that are not supported by GoGoRoad roadside assistance service. To display only relevant vehicle models, configure the integration to support two calls to the NHTSA service: one for passenger cars, and one for trucks.

The following table provides the credentials you need to complete the challenge.

RoleUser namePassword
Application Developerauthor@gogoroadpega123!

Note: Your practice environment may support the completion of multiple challenges. As a result, the configuration shown in the challenge walkthrough may not match your environment exactly.

Challenge Walkthrough

Detailed Tasks

1 Create a data object with an external data source

  1. In the App Studio navigation pane, clickData > Data objects and integrations to open the Integration Designer.

    Adding an external data source to a data type (1)

  2. In the upper-right corner of the landing page, click New to open the Data Object wizard and create a data object to access the NHTSA service.
  3. In the Data Object wizard, in the Data objects name field, enter NHTSA Model data.
  4. In the System drop-down, select Create new. The wizard updates to display additional fields to define the new data source.
  5. In the Name field, enter NHTSA vPIC.
  6. In the Description field, enter NHTSA Product Information Catalog Vehicle Listing.

    Adding an external data source to a data type (2)

  7. In the Endpoint URL field, enterhttps://vpic.nhtsa.dot.gov/api/vehicles/GetModelsForMakeYear/make/Ford/modelyear/2015/vehicletype/Truck?format=json to specify the URL for the NHTSA web service. The Parameters section expands to display the URL parts for the service URL.
  8. Using the following table, add parameters for the make, model year, and vehicle type parts of the service URL.
    URL partParameter name
    Fordmake
    2015modelyear
    Truckvehicletype

    Adding an external data source to a data type (3)

  9. Click Initialize call to call the REST service and advance to the second step of the wizard.

2 Map the response from the data source

Note: The responseindicates sevenresults were returned and displays data for one of the seven results. The number of results returned varies according to the parameters passed to the service.

  1. In the SearchCriteria row, click Add new to map the SearchCriteria field from the REST response to a field for the data object. The contents of the row update to display the Map to field and a drop-down listing field types.
  2. In the SearchCriteria row, click the Add/Edit map to icon to accept the default mapping and create a text field named SearchCriteria in the data object.

    Adding an external data source to a data type (4)

  3. Repeat steps 1 and 2 for the Make_Name, Model_Name, and VehicleTypeName response fields.

    Adding an external data source to a data type (5)

  4. Click Next to complete the data mapping and advance to the third step of the wizard.

3 Define the endpoint settings for the integration

Note: The NHTSA does not require user authentication to access the service and receive response data. Other data providers may require authentication. Verify any authentication requirements when you configure an integration to a web service.

  1. Under Endpoint URL, in the Name field, enter GetVehicleModels_BaseURL to identify the connection settings.
  2. Under Stage, in the Base URL field, enter https://vpic.nhtsa.dot.gov to complete the URL used after migrating the application to a staging system.
  3. Under Prod, in the Base URL field, enter https://vpic.nhtsa.dot.gov to complete the URL used after migrating the application to a production system.
  4. Under Authentication, in the Name field, enter AuthProfile_NHTSA_vPIC.

    Adding an external data source to a data type (6)

  5. Click Submit to complete the configuration of the data object and REST integration.

4 Aggregate the responses from the data source

  1. In the Dev Studio navigation pane, click Data typesto list the data objects defined for the GoGoRoad application.
  2. Click Vehicle modelsto open the data type.
  3. Click the Sources tab to view available sources and click List Vehicle models to openthe D_VehiclemodelsList data page, which caches a listing of vehicle models.
  4. In the Data Sources section, clear theSimulate data source check box to remove the simulated data source from the data page.
  5. In the Source drop-down, select Aggregate sources to source the data page using two REST calls.
  6. In the Aggregate source name field, enter NHTSA vPIC to identify the data source for the data page.
  7. In the Source drop-down, select Data transform.
  8. Click Add source to add a second source for the data page.
  9. In the second Source drop-down, select Data transform.

    Adding an external data source to a data type (7)

5 Configure the source data transform

  1. For the first source, in the Data transform field, enter MapModels.
  2. Click the Openicon to create the data transform.

    Adding an external data source to a data type (8)

  3. Click Create and open to accept the default settings and open the data transform rule form.
  4. Click the Parameters tab to define the three parameters required by the NHTSA service.
    1. On the Parameters tab, click the Addicon to add a row to define a parameter.
    2. In the empty parameter row, in the Name field, enter make.
    3. In the Required drop-down, select Yes.
    4. Repeat steps 4a-4cto add two more parameters to the data transform, using the information in the following table.
      NameRequired
      modelyearYes
      vehicletypeYes
  5. Click the Pages & Classes tab to identify the pages used by the data transform and the class of each page.
    1. On the Pages & Classes tab, in the Page name field, enter Primary.pxResults to identify the page that contains the output of the data transform.
    2. In the Class field, enter or select GoGo-GoGoRoad-Data-VehicleModels to identify the class of the output page.
    3. Click the Add item icon to add a second row to the Pages & Classes tab.
    4. In the Page name field, enter D_NHTSAModelData.Results to identify the page that contains the output of the data transform.
    5. In the Class field, enter or select GoGo-GoGoRoad-Data-NHTSAModelData-Results to identify the class of the output page.

      Adding an external data source to a data type (9)

  6. Click the Definition tab to configure the data transform logic.
    1. For step 1, in the Action drop down, select Append and Map to to create a new results page for each result returned. The data transform adds a child row labeled 1.1 below step 1.
    2. For step 1, in the Target field, enter Primary.pxResults.
    3. In the Relation drop-down, select each page in.
    4. In the Source field, enter D_NHTSAModelData[vehicletype:param.vehicletype,modelyear:param.modelyear,make:param.make].Results to pass the required parameters to the data page that calls the NHTSA service and caches the response.
    5. For step 1.1, in the Target field, enter or select .Make to set the value of the Make property on the target page.
    6. In the Source field, enter or select .Make_Name to identify the property to copy to the target.
    7. Click the Add a rowicon twice to addsteps 1.2 and 1.3 to the data transform.
    8. Complete the fields of steps 1.2 and 1.3 by using the information in the following table.
      ActionTargetSource
      1.2Set.Model.Model_Name
      1.3Set.VehicleType.VehicleTypeName

      Adding an external data source to a data type (10)

  7. Click Save to complete the configuration of the data transform.

6 Parameterize the data page to configure both service calls

  1. In Dev Studio, click the D_VehiclemodelsList tab to return to the data page rule form.
  2. On the D_VehiclemodelsList data page rule form, click the Parameters tab to add parameters to the data page.
  3. In the empty row, in the Name field, enter make to define a parameter for the make to pass to the data transform.
  4. In the Required drop-down, select Yes to mark the parameter as required.
  5. Click the Add itemicon to add a second parameter to the data page.
  6. In the second row, in the Name field, enter modelyear to define a parameter for the model year to pass to the data transform.
  7. In the Required drop-down, select Yes to mark the parameter as required.
  8. Click the Definition tab to resume configuration of the aggregate sources.
  9. Below the Data transform name field, click Parameters to open a dialog box for setting values to pass to the data transform.
    1. In the dialog box, in the Value field for the make parameter, enter param.make to pass the value of the make parameter passed to the data page.
    2. In the Value field for the modelyear parameter, enter param.modelyear to pass the value of the model year parameter passed to the data page.
    3. In the Value field for the vehicletype parameter, enter Passenger Carto pass a constant string.
    4. Click Submit to close the modal dialog and save the parameter configuration.
  10. For the second aggregate source, in the Data transform name field, enter or select MapModels to call the data transform a second time to populate the data page.
  11. Press the Tabkey to exit the field. The Parameters link is displayed below the Data transform name field.
  12. Repeat step9 for the second aggregated source to add parameter values for the MapModels data transform byusing the information in the following table.
    ParameterValue
    makeparam.make
    modelyearparam.modelyear
    vehicletypeTruck
  13. Click Save to complete the configuration of the data page.

7 Confirm your work

  1. In App Studio, click Preview application to return to the User Portal.
  2. Create a new Assistance Request case.
  3. Advance the case to the Identify vehicle step, completing any required fields.
  4. In the upper right corner, click theDesignicon to open Design mode.

    Adding an external data source to a data type (11)

  5. On theVehicle Informationsection, click theEdit this sectionicon.

    Adding an external data source to a data type (12)

  6. On theModelfield, click theEdit this fieldicon to configure the Model drop-down list to pass the required parameters to the data page. A configuration pane is displayed on the right side of the browser window.
    1. In the List source section, clear the contents of the Data page field.
    2. In the Data page field, enter or select D_VehiclemodelsList to re-select the page and update the properties paneto display the required parameters.
    3. In the Value field for the make parameter, enter or select .Make.
    4. In the Value field for the modelyear parameter, enter or select .ModelYear.
    5. In the Property for value field, enter or select .Model.

      Adding an external data source to a data type (13)

    6. In the upper right corner of the pane, click Apply to complete the configuration of the drop-down.
    7. Click Design to toggle Design mode.
  7. In the Model year field, enter 2015.
  8. In the Make field, enter Ford.
  9. Click the Model drop-down to display a list of vehicle models, grouped by vehicle type.

    Adding an external data source to a data type (14)

Available in the following missions:

  • Data and Integration Foundation v1
  • System Architect v2
Adding an external data source to a data type (2024)
Top Articles
[PDF] DIRECTORIES AND LISTS - Free Download PDF
Phonograph enthusiasts attuned to aural time tunnel
ARK Survival Ascended Floating Turret Tower Build Guide
Bez.talanta Leaks
Wal-Mart 2516 Directory
Smoke Terminal Waterbury Photos
Craigslist Coeur D'alene Spokane
Redbox Locations Walmart
Fatshark Forums
Pebble Keys 2 K380s Bluetooth Keyboard | Logitech
His Words Any Sense Figgerits
Summoner Calamity
Rally 17 Crt Tiller Parts
Danville Va Gotcha Paper
Think Up Elar Level 5 Answer Key Pdf
Chase Bank Time Hours
Watch Valimai (2022) Full HD Tamil Movie Online on ZEE5
Peraton Sso
Dangerous Cartoons Act - Backlash
Does Publix Pharmacy Accept Sunshine Health
洗面台用 アクセサリー セットの商品検索結果 | メチャ買いたい.com
Uga Im Leagues
Genova Nail Spa Pearland Photos
Dr Seuss Star Bellied Sneetches Pdf
Gestalt psychology | Definition, Founder, Principles, & Examples
Twitter claims there’s “no evidence” 200 million leaked usernames and email addresses came from an exploit of its systems
Wmu Academic Calendar 2022
Everything to know on series 3 of ITV's The Tower starring Gemma Whelan
Pearl City Hall Pearl Ms
2621 Lord Baltimore Drive
Craigs List Skagit County
Lkq Pull-A-Part
Auto Next, 2496 Mount Moriah Rd, Memphis, TN 38115, US - MapQuest
Samsung Galaxy Z Flip6 | Galaxy AI | Samsung South Africa
Horseheads Schooltool
Pixel Run 3D Unblocked
Youravon Comcom
Inland Empire Heavy Equipment For Sale By Owner
Section 212 Metlife Stadium
Cashflow Manager Avid
Hood County Buy Sell And Trade
Pokeclicker Pikablu
Mathews Vertix Mod Chart
Abq Pets Craigslist
5 Pros & Cons of Massage Envy (VS Independent Massage Therapists)
Neo Geo Bios Raspberry Pi 3
Steel Punchings For Sale
What Time Does The Chase Bank Close On Saturday
Varsity Competition Results 2022
Yi Asian Chinese Union
Fapspace.site
Ds Cuts Saugus
Latest Posts
Article information

Author: Frankie Dare

Last Updated:

Views: 6105

Rating: 4.2 / 5 (73 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Frankie Dare

Birthday: 2000-01-27

Address: Suite 313 45115 Caridad Freeway, Port Barabaraville, MS 66713

Phone: +3769542039359

Job: Sales Manager

Hobby: Baton twirling, Stand-up comedy, Leather crafting, Rugby, tabletop games, Jigsaw puzzles, Air sports

Introduction: My name is Frankie Dare, I am a funny, beautiful, proud, fair, pleasant, cheerful, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.