Tutorial

  1. Home
  2. Docs
  3. Tutorial
  4. 27. Overview of existing Skyvva adapters
  5. 27.7 How to use Mule skyvva adapter?

27.7 How to use Mule skyvva adapter?

The Skyvva Connector helps accelerate integration to Salesforce product Skyvva with Mule 4. Using this connector you can directly call Integrate, Integrate Batch and Integrate Synchronous functionality of Skyvva. The same can be used to send multiple package of message to a HTTP listener which will collect all your message before sending to the next processor. It also can be used for subscribing Salesforce topic (streaming api).

Prerequisite:

  1. Anypoint Studio 7.3.2+
  2. JDK 1.8
  3. Mule Runtime 4.1.4+

You need to create a Mule project to use this connector. Once you created the project add the following dependency in your pom.xml

     <dependency> 
            <groupId>org.mule.extension</groupId> 
            <artifactId>mule-skyvva-extension</artifactId> 
            <version>1.3.1</version> 
            <classifier>mule-plugin</classifier> 
     </dependency>

The connector internally connect with salesforce to fetch the ouath token details required for Skyvva application.The following operations are supported by this connector. 

Use Mule pallet to search Skyvva connector. 

 

 

 

 

 

 

 

 

 

Integrate, Integrate batch, Integrate synchornous  and Subscribe need same configuration as bellow: 

Consumer Key:  Salesforce Consumer key 
Consumer Secret: Salesforce Secret key 
Username: Salesforce username 
Password: Salesforce password 
Base API URL: Salesforce base url for your application. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Use the Test Connection button to test the connection once you are done with your configuration. The meta data for your transformation for this connector will work once you click on the Test Connection and the result is success. 

 Once you done with these above steps then go to Skyvva Setting Tab to set the Skyvva Integration and Interface name for your configuration to use for your operation as bellow: You need to click on the refresh icon to load the data for each of the dropdown. Once you select the value from Integration dropdown then again click on the refresh icon of Interface dropdown to load that data. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  1. Integrate: 

It is used to call the Integrate method call of Skyvva application.When you use this operation you will find the bellow configuration in your mule Anypoint Studio. 

 

 

 

 

 

 

 

When you use a Transform Message before this connector then base on your integration and interface name you will find the respective meta data in the data sense as bellow:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

When you use a transform message after the skyvva connector then based on the response type from the integrate request you will find the meta data as bellow: 

 

 

 

 

 

 

 

 

 

 

 

 

The bellow is an example application to use Integrate method. 

        Use-case :  

  • Postman will send one message. 
  • The message will be received by Mule HTTP listener. 
  • Mule will convert the message to required format for Integrate operation. 
  • Skyvva Integrate operation will be used to make REST call to salesforce. 
  • The response will be formatted into json and return to postman. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Integrate Batch 

It is used to call the Integrate Batch method of Skyvva application. When you configure this operation you will able to find the data sense capability (meta data) as  it is for Integrate operation.  

 

 

 

 

 

 

 

The bellow is an example application to use Integrate method. 

        Use-case :  

  • Postman will send five messages. 
  • The messages will be received by Mule HTTP listener. 
  • Mule will convert the messages to required format for Integrate Batch operation. 
  • Skyvva Integrate Batch operation will be used to make REST call to salesforce. 
  • The response will be formatted into json and return to postman. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Integrate Synchronous 

It is used to call the Integrate Synchronous method of Skyvva application. When you configure this operation you will able to find the data sense capability (meta data) as  it is for Integrate operation.  

 

 

 

 

 

 

 

The bellow is an example application to use Integrate method. 

        Use-case :  

  • Postman will send one message. 
  • The message will be received by Mule HTTP listener. 
  • Mule will convert the message to required format for Integrate Synchronous operation. 
  • Skyvva Integrate Synchronous operation will be used to make REST call to salesforce. 
  • The response will be formatted into json and return to postman. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Collector  

This operation works like a HTTP listener but the additionally it can gather multiple package of messages before sending to the next processor of mule. The number of message for a request decided by the header information provided with the request. It supports following header information along with the request: 

 

 

 

 

 

Content-Type : It only supports application/json 
TransactionId : Unique value for one bulk of messages. (e.g We have 3 message to send then it should be same for all of that three messages). 
CurrentPackage : It should have the current package number of the message from a bulk messages. (It should be start in ascending order) 
CompleteNumberOfPackage: Total number of package contained in a bulk message. 

 Use-case :  

  • Postman will send three messages. 
  • The message will be received by Skyvva Collector listener. 
  •  Connector will gather all three message and finally for package number 3, it will write those messages to a file. 

1st Message : [{ „message“: „1st message“}] 

 

 

 

 

 

 

 

 

 

 

 

2nd Message: [{ „message“: „2nd message“, „details“ : {„status“: „success“} }] 

 

 

 

 

 

 

 

 

 

3rd Message: [{ „message“: „Final message“, „details“ : {„status“: „Completed“} }] 

 

 

 

 

 

 

 

 

 

 

 

 

 

The output will be written to a file with bellow content. 
 [ 
    { 
        „message“: „1st message“ 
    }, 
    { 
        „message“: „2nd message“, 
        „details“: { 
            „status“: „success“ 
        } 
    }, 
    { 
        „message“: „Final message“, 
        „details“: { 
            „status“: „Completed“ 
        } 
    } 
] 
 

Mule configuration for Collector operation: 

 Create a HTTP Listener using Skyvva Collector  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Create a flow using the above collector configuration 

 

 

 

 

 

 

 

Configure the path for which you want to configure the collector. 

 

 

 

 

 

 

  • Skyvva Subscribe Operation: 

 This operation is used to subscribed skyvva related topic using salesforce streaming api 

 

 

 

 

 

 

 

 

 

 

 

User-case: 

  1. Create flow to subscribe All_Account_Change topic.  
  2. On receive of new event ( which ll occur on change of Account object), send an email. 

Was this article helpful to you? Yes No

How can we help?