---
sourceDocument: Australia Build workflows
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/build-workflows

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Build workflows

ft:clusterId :

    - crworkflow

bundleId :

    - crworkflow

workflow :

    - Creator


---

# Complex data

# Complex data transform functions {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Use complex data transform functions to serialize Complex Object data pills into an XML
format.
Complex data functions require a Complex Object input data pill. Make sure to use the
correct input [data pill type](https://servicenow-prod.fluidtopics.net/Ct3dsJ0IiWIcbamXVRVy2g "Actions and subflows use variables to store input and output data. The variable data type determines what kind of data it stores and its advanced configuration options.") when applying
complex data transform functions. If a complex data transform function is applied to an
improper data type, the data is not transformed at runtime and the input value is returned
instead. For more information on confirming your flow runtime values, see [Test a flow](https://servicenow-prod.fluidtopics.net/16GAKmUMqo2akmwgAuG1TA "Before activating a flow so other users can access it, test to make certain it works the way you expect.").

## To XML {#complex-data-transform-functions__subtract-time}

Serializes the input Complex Object to XML.  
{#complex-data-transform-functions__table_njf_tpn_mkb__entry__2}

| Input data pill | Output data pill |
|-|-|
| Complex Object | XML - XML document formatted as a String |
[ ]

{#complex-data-transform-functions__table_njf_tpn_mkb}  
Figure 1. Example

* Input: `{ "article_id": KB3843202, "article_description": "How do I reset my
  Active Directory password?" }`
* Output: `<article_id>KB3843202</article_id>
  <article_description>How do I reset my Active Directory
  password?</article_description>`

{#complex-data-transform-functions__ul_mqm_rxh_kjb}

In this example, an action makes a REST call to a third-party knowledge base and
retrieves KB article IDs and descriptions. The To XML transform function changes the
response body's JSON text into XML format before it is integrated into the system's
knowledge base.  
Figure 1. Data transformed from JSON text to XML format

