# Section 14: Zero Copy Connectors

Pre-requisites: Zero Copy Connectors setup (Estimated time 15 minutes) Bring your own YP5+ DemoHub instances with Zero Copy Connectors narratives pre-installed.

FOLLOW INSTRUCTIONS ON THIS PAGE: <https://demohub.service-now.com/kb\\_view.do?sys\\_kb\\_id=38f60ec92b43aa5099d1fe1fed91bf38>

> Note that installation of narrative(either Snowflake or Databricks) is mandatory as it installs the sn\_data\_fabric\_zcc plugin

\##Overview:

You will learn how to create a Data Fabric table and how to use it in a subflow that you will then pass to an agent.

### Part 1: Creating a data fabric table

Instruction Image Navigate to Workflow Data Fabric Hub. If you had followed the setup instructions, your screen should look like the image. Click "Edit"

**Do not click "Test Connection"**

![Zcc](/files/9yEsCBano3aZbt1e40oS)

Click "Save and connect", then click "Continue" on the pop-up box. It should take about 30 seconds to load. You will be directed to the "Data assets" tab. These contain all the tables in the corresponding "catalog" in Databricks.

Click the "wdf\_demo\_now" folder

![Zcc](/files/bJbdIU6RrGDvekb8qqHn)

We will use a sample dataset for POS transactions. Click "pos\_transaction\_logs" Data fabric tables tab should be empty as we have not created any data fabric tables yet. Click "Columns", this will show you all the columns in the "pos\_transaction\_logs" table Click "Create data fabric table"

![Zcc](/files/ErJdmauIEnksGGhidsx9)

On "New data fabric table", enter Label: "Retail POS Transactions" Name will be automatically generated Click "Continue"

> Note that scope applies here, so you can create data fabric tables in scopes like how you would any custom table

![Zcc](/files/vGlBU0tywdjlQNT1nt3q)

Click the select all check box as we want all the columns Toggle true on primary for "transaction\_id" - This will be our record identifier Click "Finish", the "Confirm"

![Zcc](/files/QaOHqtjtOrWhyl03GyKz)

Congratulations! You've successfully created a Data fabric table using ZCC with Databricks. Click on the more icon next to your new data fabric table, then click "Open list"

![Zcc](/files/Vypzda8gmZ04BzhQW5V9)

You will be brought to the list view of all records on the data fabric table. You can interact with this table like how you would on any other table in ServiceNow.

![Zcc](/files/FgplMYPnZseismrJyvOn)

## Part 2: Creating a subflow

Navigate to Workflow Studio Click New > Subflow

![Zcc](/files/o4t3BKe0TgFbsblRFDO6)

We will create the subflow from scratch. Click "Build on your own" tab. Name the subflow: Lookup POS Transactions Change Run as: "System user" Click "Build subflow on your own"

![Zcc](/files/cAIZ6teKU9bk1nuB3yeo)

We will assume that the AI agent will want to query the last 4 digits of the card number, as well as the amount of the transaction Create 2 inputs Card number - string Amount - string

![Zcc](/files/4X9DO4Dwvya0bmgvKfOz)

Create 2 outputs Label: Card vendor, type: string Label: Status of transaction, type: string

![Zcc](/files/eHADDEGBZ8aHb3Hk0YLl)

Add a new action > Look Up Record We are only returning for one record for simplicity

![Zcc](/files/joC6YfrYS8PjXetWaxDC)

Table: Retail POS Transactions Conditions: Amount is drag amount from input AND Card number contains drag Card number from input

![Zcc](/files/Ca65vXmTPruSiMbhQi3R)

Add "Flow Logic" action > "Assign subflow outputs" Add a new row to assign to "Card vendor" output with the "Card vendor" data pill from the look up record action Do the same for "Status of transaction"

![Zcc](/files/qmrUxRtL5wKldYGHh3n9) ![Zcc](/files/o4Jdu3Lg1hTKxJhMy1nm)

Let's test our Subflow. First "Save" the subflow, then click "Test" Enter Card number 7894, and Amount is 92.83

![Zcc](/files/dt4Uo14jr02WtqZmaXAO)

View test results

![Zcc](/files/CdzJmt8lDjZ41SVdyfSU)

Go back and publish the flow

![Zcc](/files/dQ3s4sOs2LZuKw3zMXZq)

## Part 3: Use in Agent

Create a new AI Agent Use Now Assist: This agent retrieves POS transaction data. Save and continue

![Zcc](/files/yZLdX51hWsSYoy44OXQB) ![Zcc](/files/CWsMUC6jwxk3tmHgaefe)

Add a tool: Subflow Follow the inputs in the screenshot Click Add Save and continue Hint: Remember to publish your subflow from before, if not the execution won't work in the next step

![Zcc](/files/0mmM1p4noQrn4WgCrTPI) ![Zcc](/files/481ITTbQcIqHuJX1IowU) ![Zcc](/files/1DJpMRpw4QFy2ATlSIVH)

Skip the next 2 pages for now to get to the testing page.

Your newly created AI agent should be selected. Enter the following task: "help me find the information for a transaction that is 102.13, for a card number ending 7894" Test

![Zcc](/files/CeSgfOgG8MQLWvcHysKA)

Was it successful? What message did you get?

![Zcc](https://github.com/rajatrakesh/DataAILab/blob/main/screenshots/zcc-25.png)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://servicenow-data-and-ai.gitbook.io/dataailab/section14-zero-copy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
