Coupa V2 Connector > Coupa V2 Operations > Coupa V2 Source Operations
  

Coupa V2 Source Operations

Create a Source transformation in the Mapping Task wizard to read data from Coupa.
When you select a Coupa V2 connection for a Source transformation in a mapping to read data from Coupa, you can select an operation from the list of operations.
The following table lists the supported Coupa source operations and the corresponding API resource path:
Operation
API Resource Path
GET_Accounts_favorites
/api/accounts/favorites
GET_Accounts_index
/api/accounts
GET_Accounts_recent
/api/accounts/recent
GET_Accounts_show
/api/accounts/:id
GET_AccountTypes_action
/api/account_types(/:action(/:id))
GET_AccountTypes_index
/api/account_types
GET_AccountTypes_show
/api/account_types/:id
GET_AccountValidationRules_index
/api/account_validation_rules
GET_AccountValidationRules_show
/api/account_validation_rules/:id
GET_Addresses_index
/api/addresses
GET_Addresses_show
/api/addresses/:id
GET_AdvanceShipNotices_index
/api/asn/headers
GET_AdvanceShipNotices_show
/api/asn/headers/:id
GET_Approvals_index
api/approvals
GET_Approvals_show
/api/approvals/:id
GET_BudgetLineAdjustment_index
/api/budget_lines/:budget_line_id/budget_line_adjustments
GET_BudgetLineAdjustment_show
/api/budget_lines/:budget_line_id/budget_line_adjustments/:id
GET_BudgetLines_index
/api/budget_lines
GET_BudgetLines_show
/api/budget_lines/:id
GET_ContentGroups_index
/api/business_groups
GET_ContentGroups_show
/api/business_groups/:id
GET_Contracts_index
/api/contracts
GET_Contracts_retrieveLegalAgreement
/api/contracts/:id/retrieve_legal_agreement
GET_Contracts_show
/api/contracts/:id
GET_ContractTerms_index
/api/contracts/:contract_id/contract_terms
GET_ContractTerms_show
/api/contracts/:contract_id/contract_terms/:id
GET_Currencies_index
/api/currencies
GET_Currencies_show
/api/currencies/:id
GET_Departments_index
/api/departments
GET_Departments_show
/api/departments/:id
GET_ExchangeRates_index
/api/exchange_rates
GET_ExchangeRates_show
/api/exchange_rates/:id
GET_ExpenseArtifacts_ExpenseLines_index
/api/expense_lines/:expense_line_id/expense_artifacts
GET_ExpenseArtifacts_ExpenseLines_show
/api/expense_lines/:expense_line_id/expense_artifacts/:id
GET_ExpenseArtifacts_ExpenseReports_index
/api/expense_reports/:expense_report_id/expense_lines/:expense_line_id/expense_artifacts
GET_ExpenseArtifacts_ExpenseReports_show
/api/expense_reports/:expense_report_id/expense_lines/:expense_line_id/expense_artifacts/:id
GET_ExpenseArtifacts_index
/api/expense_lines/expense_artifacts
GET_ExpenseArtifacts_show
/api/expense_lines/expense_artifacts/:id
GET_ExpenseLines_classify
/api/expense_lines/classify
GET_ExpenseLines_ExpenseReports_index
/api/expense_reports/:expense_report_id/expense_lines
GET_ExpenseLines_ExpenseReports_show
/api/expense_reports/:expense_report_id/expense_lines/:id
GET_ExpenseLines_index
/api/expense_lines
GET_ExpenseLines_mobileForm
/api/expense_lines/mobile_form
GET_ExpenseLines_show
/api/expense_lines/:id
GET_ExpenseReports_index
/api/expense_reports
GET_ExpenseReports_show
/api/expense_reports/:id
GET_IntegrationHistoryRecord_index
/api/integration_history_records
GET_IntegrationHistoryRecord_show
/api/integration_history_records/:id
GET_IntegrationRuns_index
/api/integration_runs
GET_IntegrationRuns_show
/api/integration_runs/:id
GET_Integrations_action
/api/integrations(/:action(/:id))
GET_Integrations_index
/api/integrations
GET_Integrations_show
/api/integrations/:id
GET_InventoryTransactions_index
/api/inventory_transactions
GET_InventoryTransactions_show
/api/inventory_transactions/:id
GET_Invoices_index
/api/invoices
GET_Invoices_show
/api/invoices/:id
GET_Invoices_submitForApproval
/api/invoices/new/submit_for_approval
GET_Items_index
/api/items
GET_Items_show
/api/items/:id
GET_LookupValues_index
/api/lookup_values
GET_LookupValues_show
/api/lookup_values/:id
GET_OrderPad_index
/api/order_pads
GET_OrderPAd_show
/api/order_pads/:id
GET_OrderPadLines_index
/api/order_pads/:order_pad_id/order_pad_lines
GET_OrderPadLines_show
/api/order_pads/:order_pad_id/order_pad_lines/:id
GET_PaymentTerms_action
/api/payment_terms(/:action(/:id))
GET_PaymentTerms_index
/api/payment_terms
GET_PaymentTerms_show
/api/payment_terms/:id
GET_PurchaseOrderLines_index
/api/purchase_order_lines
GET_PurchaseOrderLines_show
/api/purchase_order_lines/:id
GET_PurchaseOrders_index
/api/purchase_orders
GET_PurchaseOrders_show
/api/purchase_orders/:id
GET_RemitToAddresses_Invoices_index
/api/invoices/:invoice_id/remit_to_addresses
GET_RemitToAddresses_Invoices_show
/api/invoices/:invoice_id/remit_to_addresses/:id
GET_RemitToAddresses_Suppliers_index
/api/suppliers/:supplier_id/addresses
GET_RemitToAddresses_Suppliers_show
/api/suppliers/:supplier_id/addresses/:id
GET_Requisitions_createAsCart
/api/requisitions/new/create_as_cart
GET_Requisitions_index
/api/requisitions
GET_Requisitions_show
/api/requisitions/:id
GET_Requisitions_submitForApproval
/api/requisitions/new/submit_for_approval //not sure
GET_ShippingTerms_action
/api/shipping_terms(/:action(/:id))
GET_ShippingTerms_index
/api/shipping_terms
GET_ShippingTerms_show
/api/shipping_terms/:id
GET_SupplierInformation_index
/api/supplier_information
GET_SupplierInformation_show
/api/supplier_information/:id
GET_SupplierItems_index
/api/supplier_items
GET_SupplierItems_Items_index
/api/items/:item_id/supplier_items
GET_SupplierItems_Items_show
/api/items/:item_id/supplier_items/:id
GET_SupplierItems_search
/api/supplier_items/search
GET_SupplierItems_show
/api/supplier_items/:id
GET_Suppliers_index
/api/suppliers
GET_Suppliers_show
/api/suppliers/:id
GET_SupplierSites_index
/api/suppliers/:supplier_id/supplier_site
GET_SupplierSites_show
/api/suppliers/:supplier_id/supplier_sites/:id
GET_TaxRegistration_index
/api/tax_registrations
GET_TaxRegistration_show
/api/tax_registrations/:id
GET_User_index
/api/users
GET_User_show
/api/users/:id
GET_UserGroups_index
/api/user_groups
GET_UserGroups_show
/api/user_groups/:id
After you specify the connection, specify the operation on the Source tab of the Source transformation.
Select the operation you require, configure the request message in JSON from the sample template provided, and configure the advanced properties for the operation.
If you want to write to a relational target, define a relational structure for the source data by mapping the input fields in hierarchical format to the output fields in relational format. When you run the mapping, the Secure Agent retrieves data for the specified operation from Coupa.

Configuring a Request Using Request Message Editor

When you create a Source transformation, configure an JSON request message for the operation that you want to perform in Coupa.
Use the Request Message Editor to create a request message. The request message is in JSON format and contains request parameters exposed by Coupa API for a specific operation. You can use the default request message for the operation and then customize the request message to specify the data that you want to include.
To customize your request, copy the request message from the sample template to the Request Message Editor pane where you can edit the JSON message and add the attributes for the request. Remove unnecessary and empty tags from the request message to avoid operation failure. You can hide the optional elements to see the mandatory elements required for the request message.
For example, you want to perform an operation GET_Integrations_show using Coupa V2 Connector to display integrations in Coupa.
The following JSON sample shows the filters used for the GET_Integrations_show operation:
{
"id" : ""
}
The following image shows the validated request message in a GET_Integrations_show operation in the Mapping Designer:
The image shows a validated request message in the Edit Request Message dialog box.
The request message format in Coupa V2 Connector follows the service request definition in Coupa. Ensure that you use well-formed JSON formatting in the request message. You can verify if the JSON request is valid to ensure that the JSON matches the structure expected by the operation.

Field Mapping in a Source Transformation

The response message format follows the service response definition in Coupa. You can map response fields from a hierarchical to a relational structure of output groups and fields.
After you configure an operation for a source and specify the request message, create the relational format from the hierarchical data to include groups and fields that you want in the output.
Select the elements in the response structure that you want to include as output fields. The Secure Agent converts the JSON response in the hierarchical structure to relational groups at run time.
The output groups along with the primary and foreign keys are generated. You can pause on the output field to view the XPath expression, which indicates which field the output field is mapped to in the response structure of the hierarchy tree.
The following image shows an example of response structure generated from the request JSON for the GET_Integrations_show operation and the corresponding relational output fields for the response:The image shows the rsponse structure of GET_Integrations_show in the Field Mapping tab of the Source Transformation
You can edit the data type, precision, and scale for the groups and fields after mapping the fields.