Integromat
  • Back to website
Articles in this section
  • Formstack
  • Magento 2
  • Google Cloud Vision
  • ManyChat
  • Airtable
  • Bubble
  • Email (legacy)
  • Facebook Groups
  • Google Sheets (legacy)
  • HTTP
See more
  1. Integromat Support
  2. Apps
  3. Docs

Magento 2

Integromat Integromat Updated April 05, 2021 12:38

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

List of available endpoints.
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.

Was this article helpful?
6 out of 10 found this helpful
Menu
  • Features
  • Apps & Services
  • Templates
  • Pricing
  • What's new
  • Use cases
  • Feature requests
Information
  • Privacy
  • Terms
  • FAQ
  • Help & Tutorials
  • Community
  • Academy
  • Find a partner
  • Blog
Cooperation
  • Developer platform
  • Affiliate Program
  • Become a partner
  • Schools and Universities
Company
  • About the company
  • We are hiring
  • Contact
Follow us
© 2021 Integromat by Celonis. All rights reserved. Integromat® is a registered trademark.
  • English