SK SKYVVA Documentation

68.1 How to implement custom inbound processing with apex class by old way?

Learning Objective: After completing this unit, you’ll be able to:

Introduction

We can implement custom inbound processing with apex by two ways.

what is Custom Processing Apex Class with old way?

We always response to give back the message type structure which contain the Salesforce Id and SKYVVA message Id. Customer need to write the complete code for all processing steps

Basic Processing Steps:

[aux_code language="javascript" theme="tomorrow" title="" extra_classes=""] Message   ->  Workflow   ->   Mapping   ->  Operation

[/aux_code]

Advantage

We can the fields as we have structured data.

Disadvantage

Customer need to write the complete code for all processing all steps.

How to implement custom inbound processing with apex class:

To extend some functions of integrate inbound processing extends skyvvasolutions.IProcessCustomAbs and implements skyvvasolutions.GisOdbgIntegration.IProcess Methods are order process integration of custom processing and could be overridden if required

follow the given steps to use apex class: Step1: Create apex class

[su_box title="Warning" box_color="#F7DC6F" title_color="#000000"]“Custom Processing Class”: provide full name of your custom processing class (including namespace if any). Format: [namespace.]classname eg: namespaceX.ClassX (if there is namespace in the salesforce instance) or ClassX (if no namespace)[/su_box] The bellow is example of custom processing inbound and some methods should be overridden:

Example1: [aux_code language="javascript" theme="tomorrow" title="" extra_classes=""] global with sharing class SKYVVA_CustomIntegration extends skyvvasolutions.IProcessCustomAbs implements skyvvasolutions.GisOdbgIntegration.IProcess { private List lc=new List(); global override void doMap(skyvvasolutions.IServicesUtil.IMessageResult iResult){ //Assign value of param to its property inherited from the parent this.iResult=iResult; //Map data in iResult to your salesforce sObject for(integer i=0;i mapRecord =iResult.listMapRecord.get(i); System.debug('mapRecord :: ' +mapRecord); // Contact c=new Contact(); c.LastName = mapRecord.get('lastname'); lc.add(c); } } global override List upsert2(){ //upsert records Database.UpsertResult[] results=Database.upsert(lc,false); for(Integer i=0;iStep 2: Create Integration

Step3 : Create Interface

[su_box title="Note" box_color="#2a8af0" title_color="#000000"]“Custom Processing” checkbox: indicates if the interface uses the custom-processing implementation[/su_box] Step4 : Do mapping.

Step5: upload data manually

Step7: Check result on message board

You can not see related to link here to check detail as this interface is used custom processing. Step8 ; Check uploaded record and its details on dev console.

Open this article in the interactive viewer →