How to Create a Marketplace Application?

How to Create a Marketplace Application?

Step 1:  Go to Kylas Marketplace apps >> Manage Apps >>Create App


· After Clicking on Create app, you will be asked to enter the required information

  App Type :- you can either publish this app for private use or make it public
  App Category: - Select in which category the app you want to keep
  Name of the app : - You can give any name for this app
  App Summery :-  You can give app summery
  Callback URL :- Enter a call back URL of your marketplace app where we can open it in  separate tab as a separate app (Call back url will be one where you will get code (oauth code) once you install app)
   Website URL:- enter website URL (Website url is nothing but url where your app is hosted. This is needed in order to open your app in iframe from view details CTA)
   App Description:- you can describe the features and capabilities of the app



 Now Click on Next

-------------------------------------------------------------------------------------------------------------------------------------

Step 2:

 

  Here creator can upload an icon for this app ( This Icon will be shown on Marketplace app on  the Kylas marketplace )

     


· Also creator can mention a help section to use this app for this app

· Now click on Next

-------------------------------------------------------------------------------------------------------------------------

Step 3:

· Here on step 3 you can mention/give the permissions to give the access to this marketplace app.


· When user will try to install this app, they will see all the permissions that this app requirs to access the kylas information.

  Eg -  You want to create this application so that users can make a call from Kylas itself. So you need to give following permissions

a. Call >>Create
b. Lead>> Call (special access permission when you want user to make a call for leads )
c. Contact >> Call (special access permission when you want user to make a call for contacts)

-------------------------------------------------------------------------------------------------------------------------

Step 4:


On this step you will be asked to setup a app action, the app actions will be defined by the developer's selection

No : this app will be accisable to kylas information only but won’t be able to perform any action
Yes :  When you elect yes , then you are allowing this application to take certain action on kylas records

 Here you can give different actions like,

Basic Actions- When user click on app action icon then this markeplace app will open in new tab
Embedded actions- When you select embedded actions then the app will open in an iframe under kylas environment only.

· Here you can Give a name to app action eg. Click to call, Send Message

· Also developer need to provide Target URL on which all the requred parameters will be sent as query parameter.

· All the parameters are predefined on the places that you are selecting to show this app action.
·
 If I select lead details page – inside more action , then you will receive lead ID, where app can call search lead by API by ID to get all the lead information
https://integrations.kylas.io/payment_link_logs/new?tenantName=Amura+Marketing+Technologies&tenantId=XXXX&userName=Tushar+Pingate&userId=6XXX&entityId=3528133&entityType=leads&actionName=Generate+Payment+Link&location=DETAILS_PAGE&userPhoneNumber=918888556524&entityName=demo+Lead


 

  Developer can add more place if he want to give app action by click on add new  

· Now I will click on next

---------------------------------------------------------------------------------------------------------------------------------

 

Step 5: App triggers

- In this step, the app developer can specify app triggers to trigger the Kylas workflows based on an event taking place in their application. Please refer the following article for understanding what are triggers and how to add them. https://support.kylas.io/portal/en/kb/articles/what-are-triggers-in-marketplace-app-and-how-to-add-triggers



· On this step you will receive Client ID & Client Secret you must keep these with you for the authorization and click on done.

· App ID will be needed to approve the app, to make it publicly available for all the Kylas users.
· To configure it from Backend, Developer who has create this application needs to sent this and the app id from the  URL to Kylas team to configure it from backend and to approve the app to publish the app for all the users.

 

-------------------------------------------------------------------------------------------------------------------------------------

 

Marketplace OAuth Document

 
  

                            


 

After the Market Place App is created and is ready to install. We get option to install the app, and that redirects to the page where all the scopes are displayed and “Allow to Install” button is present.

After clicking on ”Allow to Install” button, request is sent to Kylas for Auth code and the following OAuth process is started.

Developer have to use the Client id and Secret needs to be used as authorization method for the API requests to obtain auth and refresh token.

Request 1 – Kylas Sends the Auth Code to the registered redirect URL in the form of

<Redirect URL>?code=auth_code

Request 2 – Now, the Integration App needs to get Refresh Token and Access Token using auth code. The necessary request is provided in the postman collection.

curl --location --request POST 'https://api.kylas.io/oauth/token' \ 

--header 'Content-Type: application/x-www-form-urlencoded' \ 

--header 'Authorization: Basic Y2xpZW50LWlkOmNsaWVudC1zZWNyZXQ=' \ 

--data-urlencode 'grant_type=authorization_code' \ 

--data-urlencode 'code=<Auth Code>' \ 

--data-urlencode 'redirect_uri=<Redirect URL>' 

Request 3 – Kylas sends back the refresh token and access token along with scopes in the below  format

This request returns the following response

{

  "access_token": "043327d7-724d-413c-8e30-2d66f6c154c4:7:79",

  "token_type": "bearer",

  "refresh_token": "1ed0c73b-39a2-44ae-bfe6-14b37e78bb6d:7:79",

  "expires_in": 86399,

  "scope": "lead:read pipeline:read searchList:read user:read"

}

 


Note: expires_in indicates the expiry of access token (in seconds) from the time of token generation

Note: Validity of refresh_token is valid till 90 days after token is generated, so make sure to update refresh_token as well which is sent in above response each time

After the refresh token is fetched, it can be used to get new access token by using the API proved in the postman collection.


curl --location --request POST 'https://api.kylas.io/oauth/token' \ 

--header 'Content-Type: application/x-www-form-urlencoded' \ 

--header 'Authorization: Basic Y2xpZW50LWlkOmNsaWVudC1zZWNyZXQ=' \ 

--data-urlencode 'grant_type=refresh_token' \ 

--data-urlencode 'refresh_token=<Refresh Token>' 



The sample request for getting data from Kylas using access_token is provided in postman collection as well.

POSTMAN COLLECTION
https://documenter.getpostman.com/view/3365774/UzBiQ8vJ#97112d3e-4ffc-4299-976e-2b1f4013cc1b





















    • Related Articles

    • How to uninstall a marketplace application?

      This article covers the steps to be followed for uninstalling marketplace applications with a KYLAS CRM account.  Prerequisites Permissions: Any user who has a marketplace app installed Product Plans: Elevate, Explore Activities to be ...
    • How to Install SMS application?

      This article covers the steps to be followed and the pre-requisites for installing SMS App. How to Install SMS App Prerequisites Permissions: Any user having access to Kylas marketplace. Product Plans: Elevate. Step 1: Login to kylas using your ...
    • What are triggers in marketplace app and how to add triggers?

      This article covers the steps to take for adding triggers in marketplace application. What are triggers? Triggers in marketplace apps enables the app developers to trigger Kylas workflows based on an event that takes place in their application. And ...
    • How to add workflow actions in a Kylas marketplace app to perform automated actions?

      This article covers the steps to enable Workflow actions in a marketplace app actions at the time of app creation so that the users of your marketplace application can use the actions to perform some marketplace actions automatically via Kylas ...
    • How to add marketplace app trigger as a trigger event for Kylas workflow?

      This article covers the steps to perform in order to add a marketplace app trigger as the workflow trigger event. This will enable you to let a workflow get triggered by an external event taking place in a marketplace app and you can use this for ...