org.mule.modules

mule-module-coupa

1.1
Namespacehttp://www.mulesoft.org/schema/mule/coupa
Schema Locationhttp://www.mulesoft.org/schema/mule/coupa/1.0/mule-coupa.xsd
Version1.0
Minimum Mule Version3.2

Module Overview

Coupa is a provider of cloud spend management (CSM) solutions that help companies control their indirect spending and generate savings that go direct to the bottom line. This Mule Module is cable of creating, updating and finding coupa resources both master resources and transaction resources

Summary

Configuration
<coupa:config>
Configure an instance of this module
Message Processors
<coupa:find>
Searches for resources
<coupa:find-by-example>
Searches for resources using an example
<coupa:find-by-id>
Searches for an specific resource given its type and id
<coupa:save>
Creates or updates and object.

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:coupa="http://www.mulesoft.org/schema/mule/coupa"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/coupa
               http://www.mulesoft.org/schema/mule/coupa/1.0/mule-coupa.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necesary as long as each carries its own name.

Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.

Attributes
TypeNameDefault ValueDescription
xs:string name Optional. Give a name to this configuration so it can be later referenced.
xs:string apiKey The token of your company's account in Coupa.
xs:string baseUrl The base URL of your company's account in Coupa.

Message Processors

<coupa:find>

Searches for resources

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
type The type of resource to search
exactMatch Optional. TODO
offset Optional. TODO
limit Optional. TODO
Child Elements
<coupa:conditions>
Optional. TODO
Return Payload
  • an iterable of resources

<coupa:find-by-example>

Searches for resources using an example

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
type The type of object to search
exactMatch Optional. TODO
Child Elements
<coupa:prototype>
The example. Fields set will be used as search conditions
Return Payload
  • an iterable of resources

<coupa:find-by-id>

Searches for an specific resource given its type and id

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
type The type of resource to search
id The id of the resources
Child Elements
Return Payload
  • the resource for the given id
Exception Payload
RESTException if there is not resource for the given id and type

<coupa:save>

Creates or updates and object. If the resource's id is not null, the connector creates it. Otherwise, it updates the present fields, leaving the rest of fields unchanged.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
type The type of the resource to update
Child Elements
<coupa:resource>
The resource
Return Payload
  • the updated or created object
Exception Payload
RESTException if the object can not be created