> 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/exercise-6.md).

# 🎯 Exercise 6

#### Objective

Create 5 customers in Shopify, collect their details during execution, and generate one consolidated file in SFTP after the workflow completes.

#### Reference API

<https://shopify.dev/docs/api/admin-rest/2025-07/resources/customer#post-customers>

Use Create A Customer API under Shopify Beta Public System

***

### Scenario

A business wants to:

* Create multiple customers in Shopify
* Maintain a single consolidated log file instead of multiple entries

So, after all customers are created:

* Their details should be combined (concatenated)
* A single file should be created in SFTP

***

### What You Need to Do

#### Step 1: Provide Input Data (5 Customers)

```
[
 {
   "first_name": "Alice",
   "last_name": "Johnson",
   "email": "alice.johnson@test.com"
 },
 {
   "first_name": "Bob",
   "last_name": "Smith",
   "email": "bob.smith@test.com"
 },
 {
   "first_name": "Charlie",
   "last_name": "Brown",
   "email": "charlie.brown@test.com"
 },
 {
   "first_name": "Diana",
   "last_name": "Miller",
   "email": "diana.miller@test.com"
 },
 {
   "first_name": "Ethan",
   "last_name": "Davis",
   "email": "ethan.davis@test.com"
 }
]
```

#### Step 2: Create Customers in Shopify

* Loop through the input data
* Connect to Shopify and use Create Customer API

#### Step 3: Collect Data During Execution

* For each successful response:
* Extract:
* First Name
* Last Name
* Email
* Build a combined string (concatenation)

👉 Example format:

Customer Created:

Name: Alice Johnson

Email: <alice.johnson@test.com>

<br>

Customer Created:

Name: Bob Smith

Email: <bob.smith@test.com>

#### Step 4: Create File After Loop

* After all customers are processed , add an SFTP step (outside the loop)
* Choose Upload File

#### Step 5: Configure File Content

* Use the concatenated result as file content
* File path: /logs/customers\_summary.txt

#### Step 6: Run the Workflow

* Click Sync Now&#x20;
* Verify:
* 5 customers created in Shopify
* One file created in SFTP

Note: Check if the required scope is configured correctly in the Shopify app.

### Expected Outcome

* All 5 customers are created successfully
* A single file is created in SFTP
* File contains details of all customers

<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/exercise-6.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.
