Magento 2

Getting started with Magento 2

To use any of the above modules you need to have a Magento account or have Magento installed on your server.

Connecting Magento 2 to Integromat

Obtaining an access token

For creating a new connection you'll need to obtain an access token first. To do so, log into your Magento 2 administration dashboard and go to System -> Integrations.

Then hit the Add New Integration button.

The New Integration screen will show. The first step is to fill in the integration info. Only the name field is required. You will have to confirm the settings with your current password.

Once you've filled the information, switch to the API tab and set up permissions for the integration. In Integromat, different scopes are required for different modules, so be careful when setting this up. When you try, for example, to get customer data with a key that can't read that because it's not allowed to, your scenario will fail.

After setting this up, click the Save button.

Your integration will be saved and it will appear in the list of integrations. To activate the integration, click Activate.

You'll have to allow access to the scopes once again.

A list of integration tokens will pop up. Copy your Access Token to the clipboard and hit done.

The integration will be activated now. You can log out from your Magento dashboard.

Creating a new connection

Start by creating a new scenario with Magento 2 in Integromat and open the Connection dialog box.

Name your connection, paste the access token to the corresponding field and fill in the host URL. The host URL is usually the URL address of your e-shop. After filling this in, click Continue.

If everything has gone well, your new connection will be created and will show in the connection select.

And that's it. You're ready to go. Now you can use this connection in all Magento 2 modules. Remember to set correct permissions for the keys, otherwise the scenario may not work correctly.

Make an API Call

Allows you to perform a custom API call.

Connection Establish a connection to your Magento 2 account.
URL

Enter a path relative to the URL you entered while creating the connection.  E.g. /rest/V1/products

Method

Select the HTTP method you want to use:

GET
to retrieve information for an entry.

POST
to create a new entry.

PUT
to update/replace an existing entry.

PATCH
to make a partial entry update.

DELETE
to delete an entry.

Headers Enter the desired request headers. You don't have to add authorization headers; we already did that for you.
Query String Enter the request query string.
Body Enter the body content for your API call.
Search Criteria Set the search criteria. Required when the GET method is used without ID.
If the Resource Access is set to custom, do not forget to grant access to respective resources.

2019-05-15_13_08_44-Window.png

Example of Use - Search for Products

The following API call returns all products that has price set to 10:

2019-05-15_12_51_12-Integration_Magento_2___Integromat.png

Matches of the search can be found in the module Output under Bundle > Body > Items.

2019-05-15_13_12_05-Integration_Magento_2___Integromat.png

Example of Use - Create an Order

The following API call creates an order:

image__3_.png

The JSON schema for creating the order can be found at devdocs.magento.com/swagger under salesOrderRepositoryV1 > PUT /V1/orders/create.

How to create an order for the unregistered user from magento.stackexchange.com.

Troubleshooting

Error 404 when SKU contains slash /

Reason

The server does not allow encoded slashes to pass through.

Solution

Configure your server to allow encoded slashes.
Add to following settings to your Apache server configuration:

AllowEncodedSlashes On

2019-11-01_12_08_42-image__5_.png

For more details please refer to the Apache Documentation.

Popular use cases from our blog

facebook-leads-airtable-article-illustration

How to Easily Import Leads from Facebook to Mailchimp and Airtable

Active-campaign-automation-illustration.png

How to Boost ActiveCampaign Automations With Integromat

Instagram-for-business-2-illustration

Instagram for Business Automation: 3 Powerful Templates to Get Started

How-to-automate-reporting-with-nocode-illustration

Automated Reporting: Get Rolling With 4 Easy, Practical Solutions

How-to-manage-Twitter-from-a-Notion-database-part-1-Illustzration

Can You Tweet From Notion? Yes, and Here’s How to Do It [Tutorial]

slack-automation-illustration

Slack Automation: 20 Free Templates to Get You Inspired

Didn’t find what you were looking for?

Ticket

Create a ticket

Contact our world-class support team and tell us what’s happening.

Create a ticket
Expert

Find an expert

We feature a network of 450+ certified partners across the globe who are ready to help

Find an expert

Automate any workflow in your business

Sign up for a free account today. No credit card required, no time limits on free plan.