> For the complete documentation index, see [llms.txt](https://docs.dckapintegrator.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dckapintegrator.com/tutorials/workflow-builder-tutorial/3.-hello-system/3.4-lets-create-data-in-shopify.md).

# 3.4 🌿 Let's Create Data in Shopify

**Scenario**

Assume you receive product data from a PIM system in this format:

```
{
   "name": "burton custom freestyle 151",
   "body_html": "<strong>Good snowboard!</strong>",
   "vendor": "Burton",
   "type": "Snowboard",
   "status": 0
 }
```

But Shopify expects the data in this format:

```
{
 "product": {
   "title": "Burton Custom Freestyle 151",
   "body_html": "<strong>Good snowboard!</strong>",
   "vendor": "Burton",
   "product_type": "Snowboard",
   "status": "draft"
 }
}
```

👉 So, we need to:

* Map fields (e.g., name → title)
* Modify values (e.g., format text, convert status)

{% stepper %}
{% step %}

### Mock Source Data Using Code Runner

To keep things simple, we will simulate (mock) the PIM system response.

* Add a Code Runner step above the Shopify step
* Paste the following code:

```
response = {
  "name": "burton custom freestyle 151",
  "body_html": "<strong>Good snowboard!</strong>",
  "vendor": "Burton",
  "type": "Snowboard",
  "status": 0
}
```

📌 This acts as the input data from the PIM system.
{% endstep %}

{% step %}

### Configure Payload Using Data Hub

* Edit the Shopify step
* Remove the existing payload
* Select the Code Runner step from Data Hub
* The payload will appear as {{1}}

#### Add Mock Data

To help DCKAP Integrator understand the expected structure:

```
{
   "name": "",
   "body_html": "",
   "vendor": "",
   "type": "",
   "status": 0
 }
```

{% endstep %}

{% step %}

### Add Mapping

* Click Add Mapping
* You will see:

  * Left side → Input fields (from PIM)
  * Right side → Required fields (Shopify format)

  👉 Drag and drop to map fields:

<figure><img src="/files/5sKHtgrWLXbWulcACnX6" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Apply Modifiers (Data Transformation)

Modifiers help you transform values during mapping.

\
**Example Transformations**

| Input Field | Input Value                          | Modifier                          | Output Field  | Output Value                         |
| ----------- | ------------------------------------ | --------------------------------- | ------------- | ------------------------------------ |
| name        | "burton custom freestyle 151"        | TITLE(name)                       | title         | "Burton Custom Freestyle 151"        |
| body\_html  | "\<strong>Good snowboard!\</strong>" | -                                 | body\_html    | "\<strong>Good snowboard!\</strong>" |
| vendor      | "Burton"                             | -                                 | vendor        | "Burton"                             |
| type        | "Snowboard"                          | -                                 | product\_type | "Snowboard"                          |
| status      | 0                                    | <p>CONVERTER</p><p>(status, )</p> | status        | "draft"                              |

Add modifiers by clicking on the Modifier icon between the source and destination fields.

<figure><img src="/files/pdY58w4lXKCvcqqFGr8p" alt=""><figcaption></figcaption></figure>

#### Using Converter Modifier (for Status)

We need to convert numeric status into text:

* 0 → draft
* 1 → active
* 2 → archived

**Steps:**

* Click the modifier icon
* Search for Converter
* Add mappings:
* 0 → draft
* 1 → active
* 2 → archived
* Click Submit → Save

<div><figure><img src="/files/5iL7SuAQ4sESU8s4y811" alt=""><figcaption></figcaption></figure> <figure><img src="/files/Dq2alymUshrXJ9kUw3qf" alt=""><figcaption></figcaption></figure></div>

The steps where you have added Modifiers appear in Green.

<figure><img src="/files/9UIQSUMoXgsM8oZbqaGT" alt=""><figcaption></figcaption></figure>

#### Preview Your Mapping

* Open the modifier icon
* Enter a sample value
* Click Check to see the output

<figure><img src="/files/BoSUzwE7qOQAK3me8Mgj" alt=""><figcaption></figcaption></figure>

### Save Mapping

* Click Save & Exit to return to the workflow
  {% endstep %}

{% step %}

### Run and Verify

* Under Show Output in Console Logs, check Mapping & Modifiers Response
* Save the workflow
* Click Sync Now&#x20;
* Go to Logs → View Console

Check the final data sent to Shopify via API Request Information and Mapping & Modifiers Response.
{% endstep %}
{% endstepper %}

#### 🎉 Tada! You have successfully applied Mapping & Modifiers in your workflow.

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.dckapintegrator.com/tutorials/workflow-builder-tutorial/3.-hello-system/3.4-lets-create-data-in-shopify.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
