SK SKYVVA Documentation

12. Store Procedure

In this chapter, we will see one of the operation types which is the "Store Procedure".

Introduction

This chapter explains how to use the new feature store procedure by handling the response using Agent. the responding store procedure is calling out from Salesforce to database system via store procedure. After callout and we will get a response or fault message back real-time in the same calling. It supports only Synchronous mode.

How to call store procedure by handling the response using Agent

Pre-request call store procedure by handling the response  Firstly, you need to have some required step before you can do call store procedure by handling the response:

Configuration

[aux_code language="javascript" theme="tomorrow" title="Stored Procedure template:" extra_classes=""] CREATE PROCEDURE [dbo].upsertAccountTest01, @name nvarchar (255), @billingcity nvarchar (255), @billingcountry nvarchar (255), @nameOut nvarchar (255) OUTPUT, @billingcityOut nvarchar (255) OUTPUT, @billingcountryOut nvarchar (255) OUTPUT ) AS BEGIN IF EXISTS(SELECT id, name, billingcity, billingcountry FROM Account_Out WHERE Name=@name) BEGIN UPDATE Account_Out SET id=@id, name=@name, BillingCity=@billingcity, BillingCountry=@billingcountry WHERE Name=@name; END ELSE BEGIN INSERT INTO Account_Out (Id, Name, BillingCity, BillingCountry) VALUES (@id, @name, @billingcity, @billingcountry); END SELECT @id=id, @nameOut=name, @billingcityOut=billingcity, @billingcountryOut=billingcountry FROM Account_Out WHERE name=@name; END [/aux_code]

  1. Create an interface

  1. Create Adapter on Agent UI

  1. Do mapping

  1. Push data

  1. Check the result on Message board

Open this article in the interactive viewer →