How to use App Connect with Magento

Magento is an e-commerce platform that integrates online and physical shopping experiences.

The following information describes how to use App Connect to connect Magento to your other applications.

Supported product and API versions

To find out which product and API versions this connector supports, see Detailed System Requirements on the IBM Support page.

Connecting to Magento

To connect App Connect to a Magento account, provide the following connection details.

Store URL
Specify the Magento store URL, which is the base URL with or without an ending slash (/); for example, http://example.com/magento/.
User name
Specify the username of a user with administrator privileges for your Magento account.
Password
Specify the password for your Magento account.
Private network connection

Select the name of a private network agent that App Connect uses to connect to your private network. This list is populated with the names of private network agents that are created on the Private networks page. For more information, see Connecting to a private network.

To connect to a Magento endpoint from the App Connect Designer Connect > Applications and APIs page (previously the Catalog page) for the first time, expand Magento, then click Connect. For more information, see Managing accounts.

Tip:

Before you use the account that is created in App Connect in a flow, rename the account to something meaningful that helps you to identify it. To rename the account on the Applications and APIs page, select the account, open its options menu (⋮), then click Rename Account.

What to consider first

Before you use App Connect with Magento, take note of the following considerations.

  • (General consideration) You can see lists of the trigger events and actions that are available on the Applications and APIs page of the App Connect Designer.

    For some applications, the events and actions depend on the environment and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.

  • (General consideration) If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.
  • The Magento connector was developed and verified with Magento Open Source 2.2.5.
  • If you want an event in Magento to trigger flows in App Connect, configure and activate a webhook in Magento. A webhook callback URL that is provided on the Magento event node in an App Connect flow. For more information, see Magento customization for webhooks support or What are Webhooks in Magento.
    Note: A webhook URL is associated with an account. Therefore, all flows that use that account have the same webhook URL and are triggered when an event occurs.

    The following example shows a webhook callback URL in App Connect.

    https://des-01-quickstart-ma-designer-webhook-appconnect.dev.apps.appconnect.5loc.p2.openshiftapps.com/webhooks/magento/newcart/uoXVy1CbfVfgvMb87DkKq9eMeeUUSwFks-xBzVpVeAE
    • des-01-quickstart-ma-designer-webhook-appconnect-dev.apps.appconnect.5loc.p2.openshiftapps.com is the base URL
    • magento is the application name
    • newcart is the event
    • uoXVy1CbfVfgvMb87DkKq9eMeeUUSwFks-xBzVpVeAE is the webhook URL suffix
  • In an App Connect flow, you can use Magento actions to create or update the following objects with custom attributes:
    • Category
    • Customer
    • Product

    The custom attribute names and types don't need to be configured in Magento before the flow is run.

    Configuring the Magento / Create category action
  • In an App Connect flow, you can use Magento actions to create or update the following objects with extension attributes:
    • Category
    • Customer group
    • Sales credit memo
    • Sales invoice
    • Sales order
    • Sales rule
    • Sales rule coupon
    • Sales shipment

    The extension attribute names and types need to be configured in the Magento endpoint before the flow is run.

Events and actions

Magento events

These events are for changes in this application that trigger a flow to start completing the actions in the flow.

Object Event Description
Carts Deleted cart Triggers when a Cart is deleted in Magento
New cart Triggers when a Cart is created in Magento
Updated cart Triggers when a Cart is modified in Magento
Categories Deleted category Triggers when a category is deleted in Magento
New category Triggers when a new category is created in Magento
Updated category Triggers when a category is modified in Magento
Customers Deleted customer Triggers when a customer is deleted in Magento
New customer Triggers when a new customer is created in Magento
Updated customer Triggers when a customer is modified in Magento
Products Deleted product Triggers when a product is deleted in Magento
New product Triggers when a new product is created in Magento
Updated product Triggers when a product is modified in Magento
Sales credit memos Deleted sales credit memo Triggers when a sales credit memo is deleted in Magento
New sales credit memo Triggers when a new sales credit memo is created in Magento
Updated sales credit memo Triggers when a sales credit memo is modified in Magento
Sales invoices Deleted sales invoice Triggers when a sales invoice is deleted in Magento
New sales invoice Triggers when a new sales invoice is created in Magento
Updated sales invoice Triggers when a sales invoice is modified in Magento
Sales orders Deleted sales order Triggers when a sales order is deleted in Magento
New sales order Triggers when a new sales order is created in Magento
Updated sales order Triggers when a sales order is modified in Magento
Sales shipments Deleted sales shipment Triggers when a sales shipment is deleted in Magento
New sales shipment Triggers when a new sales shipment is created in Magento
Updated sales shipment Triggers when a sales shipment is modified in Magento

Magento actions

Your flow completes these actions on this application.

Object Action Description
Attribute sets Retrieve attribute sets Retrieves an attribute set from Magento
Carts Create cart Creates an empty cart and quote for a specified customer if customer does not have a cart yet.
Retrieve carts Retrieves carts
Categories Create category Creates a category in Magento
Delete category Deletes a category from Magento
Retrieve categories Retrieves a category from Magento by using its ID
Update category Updates a category in Magento
Customer groups Create customer group Creates a customer group
Delete customer group Deletes customer group by ID.
Retrieve customer groups Retrieves customer groups
Update customer group Updates customer group names
Customers Create customer Creates a customer in Magento
Delete customer Deletes a customer from Magento
Retrieve customers Retrieves a customer from Magento
Update customer Updates a customer in Magento
Products Create product Creates a product with a set of attributes in Magento
Delete product Deletes a product from Magento
Retrieve products Retrieves a product from Magento
Update or create product Updates a product if it exists in Magento, or creates a new product
Sales credit memos Create sales credit memo Creates a sales credit memo in Magento
Retrieve sales credit memos Retrieves a sales credit memo from Magento
Sales invoices Create sales invoice Creates a sales invoice in Magento
Retrieve sales invoices Retrieves a sales invoice from Magento
Sales orders Retrieve sales orders Retrieves an order from Magento
Update sales order Updates an order in Magento
Sales rule coupons Create sales rule coupon Creates a sales rule coupon.
Delete sales rule coupon Deletes sales rule coupon
Retrieve sales rule coupons Retrieves sales rule coupons
Update sales rule coupon Updates sales rule coupon
Sales rules Create sales rule Creates a sales rule.
Delete sales rule Deletes rule by ID.
Retrieve sales rules Retrieves sales rules
Update sales rule Updates sales rule
Sales shipments Retrieve sales shipments Retrieves a sales shipment from Magento

Examples

Dashboard tile for a template that uses Magento
Dashboard tile for a template that uses Magento
Dashboard tile for a template that uses Magento

Use templates to quickly create flows for Magento

Learn how to use App Connect templates to quickly create flows that complete actions on Magento. For example, go to the Discover page and search for Magento.