Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Add question

You must login to ask question.

Login

Register Now

APPSeCONNECT community provides a new way for integration super heros connect the external world. Join hands together to build a community of people to help each other, solve problems or share knowledge.

Integrating Magento with Vend HQ using REST API

Integrating Magento with Vend HQ using REST API

Table of Contents

 

  • Introduction
  • Background
  • Prerequisites
    • Acquiring Vend Credentials
    • Acquiring Magento 2 Credentials
  • Business scenario
  • Steps
    • Account Activation:
    • Technology App Creation
    • Import/Add Schema
    • Steps to Import Schema for an App
    • Endpoint Configuration (Action & Error Filter)
    • Creating Connection between the Apps
    • Designing and Running your first Workflow
    • Integration Point Creation
    • Mapping
    • Assigning Credentials
  • Conclusion
  • References

 

The article will guide you through the application integration by using Generic Rest Adapter of APPSeCONNECT for better business analytics and data monitoring. The purpose is to give knowledge on how Generic Rest Adapter could be implemented easily for integration between chosen applications. Here the chosen applications are – Vend and Magento 2.

Introduction

Integration is one of the most common need for driving any business successfully. We invest a lot on finding best tools that can help us to seamlessly sync up information between applications. APPSeCONNECT is one such integration platform, which provides a simplified approach to capture data, connect disparate applications and perform actions.

In this article, we will discuss some of the important facts that you must consider while working with APPSeCONNECT, as the integration tool to sync data between applications. We will go ahead and configure APPSeCONNECT platform to connect my POS system (Vend) with my eCommerce (Magento2).

From the article we will try to cover,

  1. How to connect an external application with APPSeCONNECT integration platform when the application is natively supported, in our case its Magento 2 and Vend.
  2. And obviously, we will give you some pointers which help you to get most of the platform.

Background

If you are targeting the emerging market of citizen integrators, the need of tool to empower them to integrate almost any application is must have for your company. As citizen integrators have their domain expertise, they are always on the lookout for the solution that equip them with self-service data integration with better data visualization to make their work much easier and more functional without being much technical.

iPaaS solutions, like APPSeCONNECT platform has the features to facilitate the needs of citizen integrators. We also organized a Webinar: iPaaS for Citizen Integrators. APPSeCONNECT fits in to deliver opportunities also for businesses that are trying to harness the niche market of SaaS based applications who are continually adding comprehensive RESTful APIs to their list. Here you will be getting one-stop solution that supports integration processes either between cloud application, or SaaS application or on-premise systems.

Business scenario

In this article, POS integration is chosen by keeping in mind the expanding horizon of Omnichannel retailers. Integration with an ecommerce stores enable them to manage offline and online sales and their inventories from central place regardless of from where the sale has been made, which in saves their time making the entire process of controlling your business simpler, also increasing your brand visibility.

We have taken 2 important scenarios for implementing POS and eCommerce integration:

  1. Customer Synchronization from Vend to Magento 2:

This Integration will help in refining the CRM, viz. you can send campaign or seasonal sale updates on time. Also, tracking customers based on their buying experience will be easier as it gives you data on people’s online and offline shopping habits, enabling you to market to customers more effectively. Loyalty fringe benefits such as discounts, coupons, reward points for repeat customers can be managed effortlessly.

Another case would be when customer has paid online for the product, but they want to collect it from store directly without waiting for shipment, so information of that customer needs to be in sync in both the application.

  1. Product Synchronization from Magento 2 to Vend:

Automating the exchange of POS store and ecommerce inventory changes is must have to make the restocking process smooth. This integration will enable its users to have a single unified catalog for the products and that can serve as the basis for better inventory management.

Prerequisites

Before, integrating using APPSeCONNECT, you must undergo few pre-requisites for establishing integration between applications that are using generic RESTful API’s. As mentioned in the beginning, example of Vend cloud application integration with Magento2 has been taken in this article to explore the features that APPSeCONNECT offers to make connection simpler. So, from both the endpoints there are certain pre-conditions that are required to be fulfilled. Let’s have a look:

  • You must have valid Vend developer account.
  • You must have valid Vend account.
  • You must have valid credentials of the Magento2 account.
  • You must have a registered account with APPSeCONNECT.

Acquiring Vend Credentials       

Follow the steps to get the Vend Credentials:

  1. To access Vend API, you need to register in to Vend developer account. Click here to register to Vend developer account.
  2. Provide account details and create the developer account.
  3. You have created the account, and you will get an account activation mail. Activate the Account and move to the Applications section in Vend developer page.
    vendHQ
  4. Provide the application details and redirection URI for the application. In this case, redirection URI will be the APPSeCONNECT portal URI i.e. appseconnect.com, as you will be using APPSeCONNECT platform for integration.
  5. Click “Add New Application” button.
    VENDHQ Auth
    Note: The generated client id, client secret and redirect URI will be used later during credential configuration while using APPSeCONNECT.
  6. Keep note of the Vend store URL, as this information will be required for configuring Vend in APPSeCONNECT. You will get the information by signing here.
  7. After signing in, you will be directed to your store. Click here for more information on Authorization.

 

Acquiring Magento 2 Credentials

For configuring Magento 2 app in APPSeCONNECT, you require following basic informations:

  • Base URL of your Magento store
  • Admin credentials
    Magento Login

Steps for Integration:

There are some necessary steps to be followed by the users for Integrating Rest Based Application by using Rest Adapter via APPSeCONNECT: –

  1. Technology App Creation
  2. Import/Add Schema
  3. Endpoint Configuration (Action & Error Filter)
  4. Creating Connection between the apps
  5. Workflow Designing
  6. Touchpoint Creation
  7. Assigning Credentials
Steps Involved Actions Involved
Step 1 Account Activation

 

Step 2 Technology App Creation

 

Step 3 Endpoint Configuration (Action & Error Filter)

 

Step 4 Creating Connection between the apps

 

Step 5 Workflow Designing

 

Step 6 Touchpoint Creation

 

Step 7 Assigning Credentials

 

Step 8 Executing the Workflow

1.    Account Activation

After successful registration with APPSeCONNECT, an email will be delivered to the mailbox of your registered email id. An activation link will be provided to you through which you can readily activate your account for the Integration.

Appseconnect login

  1. Login page will be available after account activation. Your registered email Id will be the username.
  2. In case of password, initially an auto-generated password will be available from the account activation email.
  3. After providing the valid credentials, login in into the portal, which will be redirected to the Dashboard page of the APPSeCONNECT Portal where you get a customized view of your project
    Dashboard
    Note: Before Redirecting to the dashboard page there will be a confirmation required for “Accept License Agreement” by APPSeCONNECT.

2.    Technology App Creation: –

To Perform the integration between Magento2 and Vend, you must add both the apps in the APPSeCONNECT Portal.

  1. Steps to add Magento 2 in to your APPSeCONNECT Account. Click here to know about adding applications in APPSeCONNECT.
    1. Select App from the left navigation panel.
    2. Click Choose App.
    3. Search for Magento -> Choose the version ≥ 2.0.0.0
    4. Click Save.Note: Magento2 is a pre-packaged app of APPSeCONNECT integration platform, so you will find that app directly from the app listing page. Follow the steps to add the prepackaged app.
  2. Steps to Create Technology App in the APPSeCONNECT Portal. Click here to know about the creation of the Technology Application.
    1. After you have chosen the natively supported App, click on Choose Apps dropdown
    2. Choose “Create Technology App” option.
    3. Provide the Application name, description and the type as per your requirement.
      Choose AppsNote:

      1. Vend is not a pre-packaged app of APPSeCONNECT. So, to integrate Vend via APPSeCONNECT you will get an option of adding any technology app (in this case, REST app) by using Create Technology App option in the APPSeCONNECT Portal.

      Always mark the checkbox available if your chosen application is cloud supported

3.    Import/Add Schema 

APPSeCONNECT gives you options to either create or import the schema for all the apps.

  • You can manually create a schema from scratch for an app or import the packet in XML or JSON format.
  • Once you have created the Technology App for Vend, you can fetch the schema using any readily available API testing tool viz. Postman.
  • After successfully fetching the data you must store the schema in the format of .xml or. json in your local system.

Steps to Import Schema for an App:

You can view the newly created technology app in the APP section.

Click Schema button in the below menu.

View Schema

Click Import Schema button after the schema window opens and choose the import format

Configuration

Choose and select the file from your local system

Click Display button. Once you display it, you will be able to view all the attributes for that schema.

Now open each content and click on save to complete the Import process.

4.    Endpoint Configuration: Configuring Action & Error Filter

What is an endpoint and why do we need it for data integration? Endpoint is the name of the module which we want to access or integrate. The name of the endpoint is the field which concat the URL to form a base URL.

A.    Endpoint Configuration for Vend application

Once you have added the Schema, you will get an option to Add Actions

Update

Note: In the above image, the schema is the “customers”.

Adding actions will enable you to provide endpoint information, action and error filter details that are required to fetch or post data in any of the respective app (in this case the POS application). Click here to know more about defining Action filter for a generic REST based technology app.

  1. In the action page, you must fill the following details:
    1. Endpoint – Each endpoint is the location from which APIs can access the resources from the respective module of the application. This is a mandatory field, enter the endpoint as per your schema configuration.
      Action filter
    2. Description – This field enables you to describe the endpoints. This is a mandatory field, enter the description. Click on Save.

B.    Action Filter Configuration for Vend application

  1. HTTP Method – Choose HTTP method as per the requirement whether you want to GET or POST the data. I have chosen GET option, as I want to pull the customer data from Vend. Save the details.
  2. Headers – Keep the header section blank.
  3. Parameters – As per Vend documentation (Please follow the link for more details) it has been stated that the date-time filter should get placed in the parameters section to get the data.
  4. The value in the parameter provided is “~{ReadDate(‘yyyy-MM-ddTHH:mm:ssK’,’0′)}~” , since the date time format contains the value in this particular format while we fetch the data using Postman.
  5. Click on the SAVE button for saving the provided action filters.

C.    Error Filter Configuration for Vend application

  1. To define Error filter, click on the error filter displayed on the page.
    Click here to know more about defining error filters for a REST based technology application (Vend in this case).

    1. Provide the Key and value in the Resource Path section. As per our Generic Rest Adapter compatibility there is a format for defining the key in the resource path section (i.e., Endpoint/ $).
    2. Provide the Key as customers/$ in the Resource Path section where as value will be null and save the details.
      endpoint config
    3. Http method as GET and Content Type as application/json needs to be selected same as Action filter.
    4. Click on Save to complete the process of defining Endpoint Configuration

5.    Creating Connection between the Apps

Before proceeding with the integration process, you must create a connector template for the connection, since Vend is not a pre-packaged app of the APPSeCONNECT.

  1. Create & configure a connector for REST based application. The steps are given below:
    1. Login to the portal and navigate to the Connections page.
    2. Click Create Connection button available in the connection page.
    3. The window for create connection appears. Click Configure Connector button.
    4. Choose the applications for the integration process (Vend and Magento 2)
    5. Enter application version and click Add Template buttoncreate contact
  2. After configuring the connector, navigate back to the create connection window and choose the connector for establishing the connection between Vend and Magento 2.
  3. Now provide the name for the connection you want to create. The Newly added template will be readily available in the connection page. Click on Save.

6.    Designing the Workflow and Creating touchpoint

This is the section where you get a visual canvas where you orchestrate your business process that you want to achieve by integrating your chosen set of applications. Click here to know more about the creating touchpoint. Steps to design the workflow is given here.

Create workflow

Steps to Design Workflow and create touchpoint:

  1. Navigate to the Workflow page from the left navigation menu and create a workflow by clicking on the Create Workflow button. On opening, drag the Start node that depicts the start of the Workflow.
  2. In the workflow panel, you will find template section where all the integration point templates are available for your perusal.
  3. Choose the appropriate template. Here, I have dragged the general template for the integration point
  4. Choose the connection. In our case, it will be Vend and Magento2 connection.
  5. Create the integration point by clicking on the “Create Touchpoint”
  6. The window for creating new touchpoint opens.
  7. Provide all the necessary details:
    1. Information
    2. Source Setup
    3. Target Setup
    4. Transformation
      Touchpoint Creation
  8. In the main information page, you need to provide the name, group, tag, Status and settings.
  9. In Source setup, define the source schema and action that has been created earlier. You also must select the protocol and method. Here I have chosen the protocol and method as REST.
  10. In Target setup, define the Target schema and action that has been created earlier. Here, also you must select the protocol and method. REST is chosen.
  11. Transformation page contains the mapping section where you can map the details of the source app to the schema of destination app for the sync operation.
  12. Summary section is the overview of the touchpoint configure where you can confirm the details and save.

Mapping of the created touchpoint.

At the time of designing workflow, you also need to configure the mappings between the source and target data fields. From the Workflow itself, you can derive the mapping between fields of both the application.

To know more, visit https://docs.appseconnect.com/transformation/overview/#process-of-transformation

7.    Assigning Credentials

This is the final step before the execution. User needs to have a valid credentials for both the source and destination app.

Steps for assigning credentials to Apps

  1. Select the Vend Application from APP section of APPSeCONNECT.
  2. Click on credentials options. This is the section where you will be providing your cloud application credential data, which you have saved earlier.
  3. Add new credential. Provide the details. Click on Grant, followed by the Save button
    rest connect
  4. Here is the sample credential page, where you must provide following information:
    1. Provide the base URL as https://www.vendhq.com/api (follow Vend API documentation for details)
    2. Choose the Content – Type as application/json
    3. Choose Authentication – 0Auth 2.0.
    1. Provide the Client Id.
    2. Provide Callback URL.
    3. Provide Access Token URL.
    4. Provide Client Secret.
    5. Select Grant Type as – Authorization Code.
    6. Click on Grant

    Note: Provide the Auth URL https://secure.vendhq.com/connect
    approve

  5. After clicking on Allow Access. Token will be generated. Save the credential

 

8.    Executing the Workflow

After assigning and completion of the credentials and mapping, navigate back to the created workflow and click on the play button. The workflow execution would be started for the created workflow.

In the similar way, you can create another workflow for integrating a different module or for a different operation (GET, POST etc.).

Click here to know more about deploying and execution of workflows.

workflow complete

APPSeCONNECT has recently launched its latest version – APPSeCONNECT 4.6.0 which introduced features like REST API integration, a new Process Flow suite and the power artificial intelligence into the data integration gameplay.

Conclusion

Whether you have the need to integrate data between one or more application, or you are looking for cloud migration, connectivity between applications are indispensable. With opulent rise in the number disparate applications, there is a need of tool that can handle hybrid and cloud scenarios both with equal ease. APPSeCONNECT gives you the low code platform, where you can easily integrate any chosen applications.

So, as per the capabilities explained in the article, if you have shortlisted APPSeCONNECT as your platform, that aligns with your critical use cases, then feel free to visit www.appseconnect.com

Things to Remember

The complete article talks about process of integrating the REST based application – Vend and the Ecommerce – Magento2. Apart from Prerequisites, there are certain more points or steps that must be done even when integrating with any other application. Those key-points are given below:

  1. Valid credentials for logging into the APPSeCONNECT portal
  2. Selection of the applications which is needed to be integrated.
  3. Applying credentials and validating the application credentials for making both the applications communicate.
  4. Creation of the touchpoints with valid mapping of the attributes for valid data sync.
  5. Environment setups to be done based on which environment (Cloud or OP) the process needs to be executed. Click here to know more about environments.
  6. Presently, the REST Adapter supports two set of content type conversion- XML and JSON &

Authentication Type that are supported are: Basic/ OAuth 2.0/ No auth.

References

 

For APPSeCONNECT Integration reference, you can visit –

https://docs.appseconnect.com

For API reference, Authorization & Authentication, you can visit –

https://docs.vendhq.com/

About jyotiBeginner

Leave a reply

Share via
Copy link
Powered by Social Snap