Environment
TeamDynamix, iPaaS, JSON
Issue
Provides an explanation of how to use iPaaS in your TeamDynamix ticketing application workflows.
Resolution
Flow name: flow:validate_shortcode
Purpose: Lookup and return information about a shortcode and optionally return information to the ticket by patching custom attributes or updating the feed. Returning information to ticket attributes will require custom attributes on the ticket to update.
This flow requires a single shortcode to lookup. It will return a true/false value to the workflow. A ‘success’ or ‘failure’ of the workflow step both indicate that something went wrong. It is important to follow the wait for results instructions if the workflow is to make automated decisions based on whether or not the shortcode is valid. The ‘success’ and ‘failure’ nodes of a workflow step should not be used when working with the validate_shortcode flow.
How to use
- From within a TeamDynamix workflow, create a new step with the type ‘TeamDynamix IPaaS’
- Name the workflow step.
- Choose flow:validate_shortcode in the IPaaS Flow field.
- Choose Latest Published Version in the IPaaS Flow Version field.
- See example code snippets below for acceptable values for the Additional Arguments Json field.
- Check the Wait for Results checkbox.
- Click the Add Result button and add:
- ‘isValid’
- Will be returned with ‘Shortcode is valid’ for a valid shortcode
- Click the Add Result button and add:
- ‘notValid’
- Will be returned with ‘Shortcode is not valid’ for an invalid shortcode
- This will allow for additional logic to be built into the workflow to change the path based on the validity of the shortcode.
- Save the workflow step and connect it in the workflow.
Order of operations
- Lookup Shortcode
- Patch Ticket
- Update feed
JSON Layout
{
"shortcode": "",
"feed": [
"field1", “field2”
],
"returnattrs": [
{
"field1": "{{attrid}}"
},
{
"field(x)": "{{attrid}}"
}
]
}
ShortCode - Send - Required
|
Key Name
|
Description
|
Accepted Value
|
shortcode
|
The shortcode that will be looked up.
|
Shortcode or {{attrid}} from the ticket containing a single shortcode.
|
Feed - Return - Optional
|
A comma separated list of values to return to the feed. Values will be added to the feed one per line with the field name ( fieldname : value ).
|
Key Name
|
Description
|
Accepted Value
|
feed
|
A list of values to return to feed.
|
Any key name from the return attributes table.
|
Return Attributes - Return - Optional
|
A list of key-value ( {“isValid”: “{{xxxxxx}}”} ) pairs to return to the ticket. The key represents what data should be returned, and the value is the attribute id the data should be sent to. Any combination of values can be returned, but they must all have a unique custom attribute on the form.
|
Key Name
|
Description
|
Returns data to
|
isvalid
|
True/False return of whether the shortcode is valid. This value is true if the shortcode api returns ‘open’ or ‘endowment’. It will return false for all other shortcode statuses.
|
{{attrid}}
|
programCode
|
The program code returned by the shorcode api.
|
{{attrid}}
|
fundCodeDesc
|
The fund code description returned by the api.
|
{{attrid}}
|
deptid
|
The department id returned by the api.
|
{{attrid}}
|
programCodeDesc
|
The program code description returned by the api.
|
{{attrid}}
|
projectGrant
|
The project grant data returned by the api.
|
{{attrid}}
|
class2Desc
|
The class 2 description returned by the api
|
{{attrid}}
|
deptDesc
|
The department description returned by the api.
|
{{attrid}}
|
fundCode
|
The fund code returned by the api.
|
{{attrid}}
|
shortCodeDesc
|
The short code description returned by the api.
|
{{attrid}}
|
class
|
The class returned by the api.
|
{{attrid}}
|
statusDesc
|
The status description returned by the api.
|
{{attrid}}
|
Note: The flow believes a shortcode is valid if it has the status of ‘open’ or ‘endowment’. Any other status is invalid.

Examples
Basic shortcode lookup from a custom attribute on a form, with a workflow that branches based on validity. This returns no data to the ticket but allows the workflow to branch.
{
“shortcode”:”{{11223}}”
}
Validate a shortcode and return the department description to a custom attribute of the ticket.
{
"shortcode": "112233",
"returnattrs": [
{
"deptDesc": "{{332211}}"
}
]
}
Validate a shortcode and return the department description and shortcode description to a custom attribute of the ticket.
{
"shortcode": "112233",
"returnattrs": [
{
"deptDesc": "{{332211}}"
},
{
“shortCodeDesc”: “{{223344}}
}
]
}
Validate a shortcode and return the department description and shortcode description to a custom attribute of the ticket, update the feed with the fund code description and the shortcode status description.
{
"shortcode": "112233",
“feed”: [
“fundCodeDesc”, “statusDesc”
]
"returnattrs": [
{
"deptDesc": "{{332211}}"
},
{
“shortCodeDesc”: “{{223344}}
}
]
}
Additional Information
Need additional information or assistance? Submit a request here: ITS-TeamDynamix Support.