Environment Map Extension User Defined Function object
Use the Environment Map Extension User Defined Function object to create, modify, delete, and restore user-defined map functions within environment data maps.
Overview
You must have the Environment Management Full Access or the Environment Management privileges to use this API object. Extensible user-defined map functions allow you to link multiple standard function steps in a defined sequence to perform sophisticated transformations between profile fields in an extended Map. With the Environment Map Extension User Defined Function object, you can:
- Retrieve the properties of an extended user-defined function
- Create new, extensible user-defined functions
- Update the configuration of an extended user user-defined function
- Delete an extended user-defined function
- Restore a deleted extended user-defined function
The actions available with this API object directly represent how you interact with extensible user-defined functions in the user interface. After using this API object, you can use the Environment Map Extension object to map through these extensible user-defined functions as part of a greater Map extension. The Environment Map Extension User Defined Function object is most useful for Integration Pack developers who need the flexibility to accommodate more complicated mapping logic for their specific business cases.
Creating user-defined functions using this object exists only at the environment extension level and are tied to a single map extension only; you cannot reference process-level functions in extensions. You can reuse a given function within a single map extension but cannot reuse it across multiple maps within an integration pack or across environments. User-defined functions are their own entities and are saved separately from extended maps that may reference them. After you save the Environment Map Extension object, the new versions of the user-defined functions communicate to the runtime.
This API supports all user-defined functions except:
-
SQL Lookups
-
Document Cache lookups
-
Get Properties
-
Set Properties
-
Set Trading Partners
Though you cannot create new Cross Reference Tables, you can look up existing Cross Reference Tables.
Structure
<EnvironmentMapExtensionUserDefinedFunction id="" environmentMapExtensionId="" name="" description="" deleted="" createdDate="" createdBy="" modifiedDate="" modifiedBy="">
<Inputs>
<Input name="" key=""/>
.
.
.
<Input name="" key=""/>
<Inputs>
<Outputs>
<Output name="" key=""/>
.
.
.
<Output name="" key=""/>
</Outputs>
<Steps>
<Step position="" cacheType="" id="" type="">
<Inputs>
<Input default="" name="" key=""/>
</Inputs>
<Outputs>
<Output name="" key=""/>
</Outputs>
<Configuration>
.
.
.
</Configuration>
</Step>
</Steps>
<Mappings>
<Mapping fromFunction="" fromKey="" toFunction="" toKey=""/>
<Mapping fromFunction="" fromKey="" toFunction="" toKey=""/>
</Mappings>
</EnvironmentMapExtensionUserDefinedFunction>
| Field | Type | Description |
|---|---|---|
| Filter | Filter | Filter |
| environmentMapExtensionID | string | The ID of an environment map extension. Important: This and other Environment Map Extension API objects require the client to know the ID of the environment map extension. In the user-defined function interface, click Copy EME ID to easily copy this ID for use in your API requests, or query the Environment Map Extensions Summary object. |
| id | string | Required. Represents the unique, system-generated ID of the extended user-defined function. |
| name | string | Required. Represents the name of the user-defined function component. |
| description | string | Optional. Additional details about the user-defined function component. |
| deleted | string | This variable indicates the deleted status of the user defined function component. If the value is true, it indicates the deletion of the referenced user-defined function. A false value indicates that the referenced user-defined function is not deleted and is available for use. |
| createdDate | numeric | Timestamp of the creation of the user-defined function. |
| createdBy | string | The user ID of the user who created the user-defined function. |
| modifiedDate | string | Timestamp of when the user-defined function was last updated. |
| modifiedBy | string | The user ID of the user who last updated the user-defined function. |
| Inputs/Outputs | string | Required. Lists the function's input and outputs according to their user-given names and keys. You must list inputs and outputs sequentially in order according to their key values. See the following row for more information. When creating or updating functions, it requires all input and output values in the request regardless if they are to be mapped or populated with a default value. The maximum number of inputs or outputs is 100. |
| key | numeric | Required. The number that represents the order in which the function's inputs or outputs appear. For a given function, the first input or output has a key attribute value of 1, the second a key attribute value of 2, and so on. Note: The key must start at 1 and then increment by one number for the list of inputs and outputs, respectively. The sequence of inputs or outputs is critical and varies for each function type. |
| Steps | string | Required. Defines the individual function steps and the order in which they need to occur within the greater user-defined function. The following attributes are used: 1.position - represents the step's number order in the greater function. 2.cacheType - indicates the caching behavior of the individual function step. The allowed cacheType values are:1.None (default, if omitted in the request)— It does not use Map function caching. 2. ByDocument — Caches the map function’s input and output values for each processed document. 3. ByMap — Caches the map function’s input and output values for each processed map. - id - represents the function step's ID in the format of "FUNCEXT--xxxxxxxxxx". 4. type - represents the type of function (for example, "MathCeil" or "CustomScripting").Within the Steps element, you also need to define the following input and output variables for each function step:1. default - Optional. Specifies the input value that the function uses if not provided by the user.2. name - the user-defined name of the associated input or output. Note: The user interface automatically uses the used function type as the step name, but you can use this API object to change function step names. 3. key - the number ID assigned to a function step. This key is used to map function steps together in the Mappings attribute. |
| Configuration | complex | Required. Represents the additional configuration requirements needed to create or modify individual standard functions within the greater user-defined function. This element is only applicable to certain function step types. See the section Map Function reference for information and for details about how to properly construct or interpret these additional configuration requirements. |
| Mappings | complex | Required. Defines the mapping of inputs and outputs for the user-defined function and each function step. It uses the following attributes: 1. fromFunction - represents the function ID from which you are mapping.2. fromKey - represents the function's output key from which you are mapping.3. toFunction - represents the function ID to which you are mapping.4. toKey- represents the function's input key to which you are mapping. |
Supported operations
| GET | QUERY | CREATE | UPDATE | EXECUTE | DELETE |
|---|---|---|---|---|---|
| Supported | Not Supported | Supported | Supported | Not Supported | Supported |
Using the GET operation
The GET operation retrieves an extensible user-defined function associated with a given environment map extension function ID.
Using the CREATE operation
The CREATE operation creates a new extensible user-defined function. User-defined functions created using the Environment Map Extension User Defined Function object exists only at the environment extension level and are tied to a single map extension only.
When creating a new user-defined function, you define individual function steps that make up the greater user-defined function. Then, in the <Mappings> section of the request, you determine how to map or link each step to and from the function's input and output.
Creating new functions requires all existing input and output values in the request regardless if they are mapped or populated with a default value. Otherwise, it overrides and removes those variables from the function.
Using the UPDATE operation
The UPDATE operation updates the extended configuration for a single user-defined function.
Updating functions require all existing input and output values in the request regardless if they are mapped or populated with a default value. Otherwise, it overrides and removes those variables from the function.
Using the DELETE operation
The DELETE operation deletes the specified user-defined function. Deleted user-defined functions return a status of true and are no longer available for use in an API call or on the user interface.
Restoring a deleted user-defined function
Reinstate a deleted user-defined function by providing the function's id in a CREATE operation. You cannot make changes to a function during restoration (in other words, you cannot edit its values in a RESTORE request). By restoring a deleted function, it becomes available for use in an API call and in the user interface. After a successful RESTORE operation, the function returns a deleted status of false. Samples appear later in this topic.
SOAP implementation
GET operation
Send the request to https://api.boomi.com/api/soap/v1/accountID.
-
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.platform.boomi.com/">
<soapenv:Header />
<soapenv:Body>
<api:get>
<api:objectType>EnvironmentMapExtensionUserDefinedFunction</api:objectType>
<api:objectId>abcd12345-6c78-9012-9eb8-345f6b678901</api:objectId>
</api:get>
</soapenv:Body>
</soapenv:Envelope>Response:
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<bns:getResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bns="http://api.platform.boomi.com/">
<bns:result xsi:type="bns:EnvironmentMapExtensionUserDefinedFunction" environmentMapExtensionId="MWRiZDhk..." id="abcd12345-6c78-9012-9eb8-345f6b678901" name="My UDF in MapExtension" deleted="false" createdDate="2021-11-10T18:09:39Z" createdBy="user@boomi.com" modifiedDate="2021-11-10T18:09:39Z" modifiedBy="user@boomi.com">
<bns:Inputs>
<bns:Input name="input" key="1"/>
</bns:Inputs>
<bns:Outputs>
<bns:Output name="output" key="1"/>
</bns:Outputs>
<bns:Steps>
<bns:Step position="1" cacheType="None" id="1" type="MathABS">
<bns:Inputs>
<bns:Input name="Value" key="1"/>
</bns:Inputs>
<bns:Outputs>
<bns:Output name="Result" key="1"/>
</bns:Outputs>
<bns:Configuration/>
</bns:Step>
</bns:Steps>
<bns:Mappings>
<bns:Mapping fromFunction="0" fromKey="1" toFunction="1" toKey="1"/>
<bns:Mapping fromFunction="1" fromKey="1" toFunction="0" toKey="1"/>
</bns:Mappings>
</bns:result>
</bns:getResponse>
</S:Body>
</S:Envelope>
CREATE operation
-
Send the request to
https://api.boomi.com/api/soap/v1/accountID.Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.platform.boomi.com/">
<soapenv:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>user@boomi.com</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<api:create>
<object xsi:type="api:EnvironmentMapExtensionUserDefinedFunction" environmentMapExtensionId="MWRiZDhk..."
description="Valid Description" name="Valid Component Name" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<api:Inputs>
<api:Input key="3" name="SOAP INPUT"/>
<api:Input key="5" name="SOAP INPUT"/>
</api:Inputs>
<api:Outputs>
<api:Output key="5" name="SOAP OUTPUT"/>
<api:Output key="3" name="SOAP OUTPUT"/>
</api:Outputs>
<api:Steps>
<api:Step id="2" type="RightTrim" cacheType="ByMap" position="1" >
<api:Inputs>
<api:Input key="1" name="Original String" default="Test"/>
<api:Input key="2" name="Fix to Length" default="3"/>
</api:Inputs>
<api:Outputs>
<api:Output key="1" name="Result"/>
</api:Outputs>
</api:Step>
</api:Steps>
</object>
</api:create>
</soapenv:Body>
</soapenv:Envelope>Response:
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<bns:createResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bns="http://api.platform.boomi.com/">
<result xsi:type="bns:EnvironmentMapExtensionUserDefinedFunction" environmentMapExtensionId="MWRiZDhk..." id="abcd12345-6c78-9012-9eb8-345f6b678901" name="Valid Component Name" description="Valid Description" deleted="false" createdDate="2021-12-06T19:19:28.132Z" createdBy="user@boomi.com" modifiedDate="2021-12-06T19:19:28.132Z" modifiedBy="user@boomi.com">
<bns:Inputs>
<bns:Input name="SOAP INPUT" key="3"/>
<bns:Input name="SOAP INPUT" key="5"/>
</bns:Inputs>
<bns:Outputs>
<bns:Output name="SOAP OUTPUT" key="5"/>
<bns:Output name="SOAP OUTPUT" key="3"/>
</bns:Outputs>
<bns:Steps>
<bns:Step position="1" cacheType="ByMap" id="2" type="RightTrim">
<bns:Inputs>
<bns:Input default="Test" name="Original String" key="1"/>
<bns:Input default="3" name="Fix to Length" key="2"/>
</bns:Inputs>
<bns:Outputs>
<bns:Output name="Result" key="1"/>
</bns:Outputs>
<bns:Configuration/>
</bns:Step>
</bns:Steps>
<bns:Mappings/>
</result>
</bns:createResponse>
</S:Body>
</S:Envelope>
UPDATE operation
-
Send the request to
https://api.boomi.com/api/soap/v1/accountID.Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.platform.boomi.com/">
<soapenv:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>user@boomi.com</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<api:update>
<object xsi:type="api:EnvironmentMapExtensionUserDefinedFunction" environmentMapExtensionId="MWRiZDhk..."
description="Valid Description" id="abcd12345-6c78-9012-9eb8-345f6b678901" name="Valid Component Name" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<api:Inputs>
<!--Zero or more repetitions:-->
<api:Input key="1" name="SOAP INPUT"/>
<api:Input key="2" name="SOAP INPUT"/>
</api:Inputs>
<api:Outputs>
<api:Output key="1" name="SOAP OUTPUT"/>
<api:Output key="2" name="SOAP OUTPUT"/>
</api:Outputs>
<api:Steps>
<api:Step position="1" id="4" type="CurrentDate">
<api:Inputs>
</api:Inputs>
<api:Outputs>
<api:Output key="1" name="Result" default="test"/>
</api:Outputs>
<api:Configuration />
</api:Step>
</api:Steps>
</object>
</api:update>
</soapenv:Body>
</soapenv:Envelope>Response:
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<bns:updateResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bns="http://api.platform.boomi.com/">
<result xsi:type="bns:EnvironmentMapExtensionUserDefinedFunction" environmentMapExtensionId="WRiZDhk..." id="abcd12345-6c78-9012-9eb8-345f6b678901" name="Valid Component Name" description="Valid Description" deleted="false" createdDate="2021-11-09T20:20:48Z" createdBy="user@boomi.com" modifiedDate="2021-12-06T20:14:09.654Z" modifiedBy="user@boomi.com">
<bns:Inputs>
<bns:Input name="SOAP INPUT" key="1"/>
<bns:Input name="SOAP INPUT" key="2"/>
</bns:Inputs>
<bns:Outputs>
<bns:Output name="SOAP OUTPUT" key="1"/>
<bns:Output name="SOAP OUTPUT" key="2"/>
</bns:Outputs>
<bns:Steps>
<bns:Step position="1" cacheType="None" id="4" type="CurrentDate">
<bns:Inputs/>
<bns:Outputs>
<bns:Output name="Result" key="1"/>
</bns:Outputs>
<bns:Configuration/>
</bns:Step>
</bns:Steps>
<bns:Mappings/>
</result>
</bns:updateResponse>
</S:Body>
</S:Envelope>
DELETE operation
-
Send the request to
https://api.boomi.com/api/soap/v1/accountID.Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.platform.boomi.com/">
<soapenv:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>user@boomi.com</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<api:delete>
<objectType>EnvironmentMapExtensionUserDefinedFunction</objectType>
<objectId>abcd12345-6c78-9012-9eb8-345f6b678901</objectId>
</api:delete>
</soapenv:Body>
</soapenv:Envelope>Response:
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<bns:deleteResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bns="http://api.platform.boomi.com/">
<successful>true</successful>
</bns:deleteResponse>
</S:Body>
</S:Envelope>
RESTORE operation
-
Send the request to
https://api.boomi.com/api/soap/v1/accountID.Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.platform.boomi.com/">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>user@boomi.com</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<api:query>
<api:objectType>EnvironmentMapExtensionUserDefinedFunctionSummary</api:objectType>
<api:queryConfig>
<api:QueryFilter>
<api:expression operator="and" xsi:type="api:GroupingExpression" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<api:nestedExpression operator="EQUALS" property="environmentMapExtensionId" xsi:type="api:SimpleExpression"> <argument>WRiZDhk...</argument>
</api:nestedExpression>
<api:nestedExpression operator="LIKE" property="name" xsi:type="api:SimpleExpression">
<argument>%UDF%</argument>
</api:nestedExpression>
<api:nestedExpression operator="EQUALS" property="deleted" xsi:type="api:SimpleExpression">
<argument>false</argument>
</api:nestedExpression>
<api:nestedExpression operator="IS_NOT_NULL" property="componentId" xsi:type="api:SimpleExpression">
</api:nestedExpression>
</api:expression>
</api:QueryFilter>
</api:queryConfig>
</api:query>
</soapenv:Body>
</soapenv:Envelope>Response:
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<bns:queryResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bns="http://api.platform.boomi.com/">
<bns:results numberOfResults="1">
<bns:result xsi:type="bns:EnvironmentMapExtensionUserDefinedFunctionSummary" environmentMapExtensionId="WRiZDhk..." componentId="abcd12345-6c78-9012-9eb8-345f6b678901" name="My UDF in MapExtension - Updated" createdDate="2022-01-21T02:40:01Z" createdBy="user@boomi.com" modifiedDate="2022-01-21T02:40:01Z" modifiedBy="user@boomi.com" deleted="false"/>
</bns:results>
</bns:queryResponse>
</S:Body>
</S:Envelope>