---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, Presentation Components, UI components]
nav: wcp_docs
parent_url: /wcp_docs/
title: >- 
  Concept: Extend App Metadata
layout: subsection
---

<a id="section_hmj_gnh_d2b"></a>
The App Metadata (AMD) contains declarations used by the different presentation components, such as data providers, tasks, flow definitions, and custom app properties.

For details about the AMD properties and subschemas, see [Reference: Extend App Metadata](/wcp_docs/btj1547749859781.html).

## <a id="section_dataProviders"></a>Data Providers

Data providers are the REST web services that the app can invoke to retrieve or update data. The `dataProviders` array in the AMD contains the base URL paths of the REST endpoints. After you declare a data provider in `dataProviders[]`, you can reference its `key` as the base URL of your page endpoints.

<b>AMD definition</b>

This sample data provider defines the base URL path for the Staffing REST service.

<b>Note:</b> Workday recommends using HTTPS in the base URL path.

```
"dataProviders": [
  {
    "key": "workday-staffing",
    "value": "https://api.workday.com/staffing/v1/"
  },
  . . .
]
```

<b>PMD reference</b>

After you've declared the data provider in the AMD, you can use the data provider `key` as the `baseUrlType` of an endpoint in the PMD.

This sample inbound endpoint uses the <i>workday-staffing</i> base URL for the specified endpoint `url`. Note that the

```
"endPoints":[
  {
      "name": "worker",
      "baseUrlType": "workday-staffing",
      "url": "workers/me"
  }
]
```

This sample outbound endpoint also uses the <i>workday-staffing</i> base URL.

```
"outboundEndPoints":[
  {
      "name": "worker",
      "baseUrlType": "workday-staffing",
      "url": "<% 'workers/' + pageVariables.myWorkerId + '/checkIns %>"
  }
]
```

## <a id="section_tasks"></a>Tasks

The `tasks` array contains page declarations and their corresponding URL routing pattern. The routing pattern can have parameters, which enable you to extract data from the URLs. You can then build your page content based on the parameter values.

When you create a page, App Builder adds a task in `tasks[]`. The default `routingPattern` is the page id. If you need to customize the routing pattern of the page in the app URL, you can override the default `routingPattern`.

Sample tasks:

```
"tasks": [
    {
      "id": "donateConfirm",
      "routingPattern": "/donateConfirm",
      "page": {
        "id": "donateConfirm"
      }
    },
    {
      "id": "createCharity",
      "routingPattern": "/charities/create",
      "page": {
        "id": "createCharity"
      }
    },
    {
      "id": "donate",
      "routingPattern": "/donate/{charityId}",
      "page": {
        "id": "donate"
      }
    },
    {
      "id": "updateCharity",
      "routingPattern": "/charities/{charityId}/update",
      "page": {
        "id": "updateCharity"
      }
    }
    . . .
]
```

This table displays sample URLs for each of the sample tasks:

<table><thead><tr><th>Task (page)</th><th>Routing Pattern</th><th>Sample URL</th></tr></thead><tbody><tr><td>donateConfirm</td><td>/donateConfirm</td><td>https://host/gms/d/wday/app/charitableDonations_abcdef/charitableDonations_abcdef/donateConfirm.htmld</td></tr><tr><td>createCharity</td><td>/charities/create</td><td>https://host/gms/d/wday/app/charitableDonations_abcdef/charitableDonations_abcdef/charities/create.htmld</td></tr><tr><td>donate</td><td>/donate/{charityId}</td><td>https://host/gms/d/wday/app/charitableDonations_abcdef/charitableDonations_abcdef/donate/12345.htmld <p><i>12345</i> is a sample charity ID.</p></td></tr><tr><td>updateCharity</td><td>/charities/{charityId}/update</td><td>https://host/gms/d/wday/app/charitableDonations_abcdef/charitableDonations_abcdef/charities/12345/update.htmld <p><i>12345</i> is a sample charity ID.</p></td></tr></tbody></table><br/>

The `/donate/{charityId}` and `/charities/{charityId}/update` routing parameters are examples of task parameterization. The page that the task invokes can reference the parameters to invoke endpoints or display data based on the parameter value.

You can set the parameter in the `taskReference` of a tag that invokes a task. This sample `button` tag sets the `charityId` parameter in the `parameterBindings` of the `taskReference`:

```
{
  "type": "button",
  "action": "AUXILIARY",
  "label": "Update",
  "taskReference": {
    "taskId": "updateCharity",
    "parameterBindings": {
      "charityId": "<% charity.id %>"
    }
  }
}
```

When a user clicks the button, it invokes the `updateCharity` task, which loads its corresponding page, `updateCharity.pmd`. The task invocation passes the `charityId` parameter, which contains a selected charity ID, in the `/charities/{charityId}/update` routing pattern.

To reference task parameters in a PMD, specify `<% queryParams.parameterName %>`. This sample endpoint `url` uses the `queryParams.charityId` as a path parameter.

```

  "endPoints": [
    {
      "name": "charity",
      "baseUrlType": "app",
      "url": "<% 'charities/' + queryParams.charityId %>",
      "authType": "sso"
    }
  ]
```

## <a id="section_flows"></a>Flow Definitions

Flows are a way of stringing pages together to form sequences of steps to complete a user task. Flows support conditional logic so that the sequence of pages can vary depending on runtime conditions.

## <a id="section_pgj_kzg_r4b"></a>Sample App

See the Charitable Donations sample app in the App Catalog.

### Related Information

[Reference: Extend App Metadata](/wcp_docs/btj1547749859781.html)

[Reference: PMD Tags](/wcp_docs/dyg1528862158582.html)

[Reference: Site Metadata](/wcp_docs/mwr1528410641805.html)

[Reference: Workday Extend API Gateways and Authorization Base URLs](/wcp_docs/dlh1653340161856.html)

[App Catalog: Charitable Donations](/app-catalog/charitableDonations)

