Coupa V2 Connector > Coupa V2 Mappings and Mapping Configuration Tasks > Coupa V2 Source Transformation in Mappings
  

Coupa V2 Source Transformation in Mappings

When you configure a Source transformation, select the Coupa V2 connection and choose an operation to represent a Coupa source. You can parameterize a Coupa V2 connection.
When you select a Coupa V2 connection for a source, you can select an operation from the list of operations. You can use the request message template to configure the request message in a JSON format. You can parameterize the input values in the request message. Configure the advanced properties to set the tracing level and the cache size for the web service response.
You can view the response structure in the field mapping. When you map the elements from the response structure to the output fields, the Secure Agent creates the output groups, along with the primary and foreign keys for the field names. When you deploy the mapping in a mapping task and run the task, the Secure Agent reads the data from Coupa.

Source Transformation Properties

You can use one or more source transformations in a mapping. Use a Joiner transformation to join data from two sources.
When you select a source, the Properties panel displays the following information:
General
Configure the name and a description for the source.
Source
Select the connection and the operation, and configure the request options and advanced source properties.
Field Mapping
Map elements of the response structure with the output fields.
Fields
Edit the metadata source field metadata that you want to use in the mapping.

Advanced Source Properties

In a mapping, you can configure a source to represent a Coupa source. For Coupa V2 connections used in Mapping Configuration tasks, you can configure advanced properties on the Source page of the Mapping Configuration Task wizard.
The following table describes the advanced properties that you can configure in a source:
Property
Description
Tracing Level
Amount of detail that appears in the log.
Use the following tracing levels:
  • - Terse
  • - Normal
  • - Verbose Initialization
  • - Verbose
Default is normal.
Cache Size for Web Service Response (KB)
Memory available for the web service response. If the web service response contains many rows or columns, you might want to increase the cache size. Default is 100 KB.

Source Transformation Mapping Example

You are an inventory data administrator and you want to extract details for all the inventory transactions from Coupa to a flat file using Coupa V2 connection.
To read data from Coupa and write to a flat file using Coupa V2 connection, perform the following tasks:
  1. 1. Create a Coupa V2 connection.
  2. The following image shows the configured Coupa V2 connection:
    The image shows the Coupa V2 connection properties.
  3. 2. Create a flat file connection to write data to the flat file.
  4. 3. Create a Coupa V2 mapping.
  5. 4. Add a Source transformation. Specify a name and description in the general properties.
  6. 5. On the Source tab, perform the following steps:
    1. a. In the Connection field, select the configured Coupa V2 connection to connect to the Coupa instance.
    2. b. In the Operation field, select GET_InventoryTransactions_show as the operation.
    3. The following image shows the GET_InventoryTransactions_show operation:
    4. c. In the Request Options section, configure the request message in the following JSON format, specify the attributes in the message, and validate the message:
    5. {
      "Id" : "",
      }
    6. The request message specifies the criteria to include inventory transactions of all the commodities. You can hide the optional elements to see the mandatory elements required for the request message. You must have the Web Services Admin (Professional) or Can Administer (Standard) user role to use the user parameter.
    7. d. In the Advanced Properties section, set the tracing level to Normal, and use the default cache size of 1024.
  7. 6. On the Field Mapping tab, select the elements, such as commodity, supplier-order-number, receiving-warehouse, item, quantity, and order-header-number in the response structure that you want to map to the output fields.
  8. The following image shows the response structure on the left pane in a hierarchical format and the output groups on the right pane in a relational format:
    The Secure Agent creates multiple output groups which results in multiple relational output files. Primary and foreign keys are auto-generated.
  9. 7. Add multiple Target transformations. Specify name and description in the general properties.
  10. 8. Select a flat file connection for the target transformations.
  11. 9. Draw links to connect the multiple output groups to a corresponding target transformation.
  12. The following image shows the Select Output Group dialog box where you select the output group to write to each target:
  13. 10. On the Field Mapping tab, select the automatic field map option.
  14. 11. Save and run the mapping.
  15. The following image shows the Coupa V2 mapping: