In Part 1, we created a Custom connector for Shopify and added One Action to retrieve customer data.
In this blog we will add more Actions to our Shopify Connector.
Actions:
- Create Customer
- Update Customer
- Retrieve All Products
Steps:
Go to Definition section
Action for Creating Customer
- Click on “New Action”

- Enter Summary, Description and Operation ID

- Go to Request and Click on “Import from sample”

- Select the verb and POST request URL, to create a new customer in Shopify

Verb: POST
URL:
https://{apikey}:{password}@{hostname}/admin/api/2020-10/customers.json
Example: https://ee28cad19:shp_8dba8dffe0c4f@vvyas.myshopify.com/admin/api/2020-10/customers.json
You can copy the sample Body from the Shopify API Developer documentation.

A Request would look like the one given below:

Now let’s change a few things so that the connector is more friendly when someones uses it in a flow.
- In the Request area, choose body then Edit.

- In the Parameter area, you now see all the parameters that the API expects to create a new customer.

- We will make the first name, last name, and email as required.
- select “first_name” click on more commands(…) and then click on edit.

- Enter Title and Set “Is required” to “Yes”

- Click on Back
- Repeat this for Last name and Email.
- Add Response
Go to Response section and click on “+Add default Response”

NOTE: you can add sample response from the Shopify API Documentation
Paste the sample in “Body” and click on Import

- Once your Action is ready click on “Update Connector”

Action for Updating Customer
- Create a new Action
- Enter Summary, Description, and Operation ID
- Summary: Update Customer
- Description: Update Customer in Shopify
- Operation Id: UpdateCustomer
- Go to Request and Click on “Import from sample”
- Select the verb and PUT the request URL to update customer in Shopify

Verb: PUT
URL:
https://{apikey}:{password}@{hostname}/admin/api/2020-10/customers/{customer_id}.json
Example: https://ee28cad19:shp_8dba8dffe0c4f@vvyas.myshopify.com/admin/api/2020-10/customers/{customer_id}.json
Here, {Customer_id} is the input parameter.
- Add Response
Go to Response section and click on “+Add default Response”

NOTE: You can add a sample response from the Shopify API Documentation
Paste the sample in “Body” and click on Import
Action for Retrieving All Products
- Create new Action
- Enter Summary, Description, and Operation ID
- Summary: Retrieve All Products
- Description: Retrieve All Products
- Operation Id: RetrieveAllProducts
- Go to Request and Click on “Import from a sample”
- Select the verb and GET request URL to retrieve all the products

Verb: GET
URL:
https://{apikey}:{password}@{hostname}/admin/api/2020-10/products.json
Example: https://ee28cad19:shp_8dba8dffe0c4f@vvyas.myshopify.com/admin/api/2020-10/products.json
- Add Response
Go to Response section and click on “+Add default Response”
6. Click on “Update Connector” once you add all your actions.

Using Custom Shopify connector in MS Flow.
Go to Custom and select Shopify connector

You can see all the actions

For demo purpose we will create a customer in Shopify


Customer created in Shopify

Snapshots of other actions
