Tutorials

  1. Home
  2. Docs
  3. Tutorials
  4. 30. Different way how to invoke outbound interface
  5. 30.1 How to push data from Salesforce by using a button, trigger, the process build process?

30.1 How to push data from Salesforce by using a button, trigger, the process build process?

Learning Objective:

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

  • Describe which are the invoke outbound interface methods.
  • Comfortably use all the methods to push data from Salesforce by using a button, trigger, the process build process.

Introduction

To show the different technology which can be use to push data to the external client by using Skyvva. For example, different possibility  like: Using Trigger, Process Builder process, Flow, Apex class to send data out. The callout methods are using to send data from salesforce to external system (SFDC to SAP/SAP-PI) through interface outbound. The Service only sends one record/children per request to SAP. To invoke callout from apex trigger the method invokeCallout(interfaceId, ids, ‘AUTO’) is recommended.

Why we use button, trigger, the process build process to push data from salesforce?

  • Process Builder: Here customer can use the Process Builder to catch the changes. When the change of a record is recognize an apex class is called and in this apex class we can invoke our API invokeCalloutXX().
  • Button : when user push a button the change data should sent
  • Trigger: When a record is changed the change data should sent.

Process Builder:

Process Builder is a Salesforce’s point-and-click tool that lets you easily automate if/then business processes and see a graphical representation of your process as you build. Every process consists of a trigger, at least one criteria node, and at least one action. You can configure immediate actions or schedule actions to be executed at a specific time. To keep things simple, this unit focuses on the most common process type: Record Change, which mean the process, will start when the records are created or edited.

The configuration
This section will be portray the example of how to execute callout and process builder.
2.1 Callout

To be able to execute callout, you have enter interface page detail and scroll down to Runtime Configuration- Outbound section then check flag “Use Skyvva Outbound Scheduler”.

Note:
– If you want to execute callout, the flag could be blank.
– If you want to create CP Record, the flag is required.

  • The interface could be set creating change pointer by process builder or trigger. You have to select SKYVVA API. This is the pre-requisite to create process builder.

This part is mainly explain the process of creating the process builder in order to create change pointer records. To build process builder, you can follow the steps below:

  • From Setup, enter Process Builder in the Quick Find Box, click Process Builder. When you are on process builder page, click on New button.

  • Fill in the name of the process

  • Add the Object and Specify when to start the Process.

  • Add the Criteria to define it for Action Group:
    1. Name the Criteria
    2. Choose Formula evaluate to true
    3. Build Formula by insert the Function and Field then click Save .

  • Add the actions to execute when the criteria are met by:
    1. Select the Action Type: Apex
    2. Select the Action Name: Create CP Record
    3. Select Apex Class: SKYVVA Callout/Create CP. When you section it, some of dropdown list will appear for you to choose. Then click Add Row to add 2 more.

To be able to execute process builder, just click on Activate button.

To monitor change pointer records: You can check the change pointer records in CDC Control Board.

 

Trigger:

When a record is changed the change data should sent. Whenever a record e.g. an account in Salesforce is changed this change are sent immediately to the client. This is the opposite way to the batch/async. variant.

Follow the given steps:

  • Select Trigger Type “APEX TRIGGER”
  • Tick Trigger Event (can tick more than one)
  •  Select your Integration Name
  •   Select your Interface Name (show only outbound interface)
  •  Select SObject Name
  •  Select Trigger Mode : None, Auto, Future, Batch
  • Click button “Generate Script”
  • Now you will see the script apex trigger in the box and can copy to use it
  • In the script, change to your own name <trigger name> to your own name

 Button

  • Select Trigger Type “BUTTON”
  • Select your Integration Name
  • Select your Interface Name (show only outbound interface)
  • Select SObject Name
  • Select Trigger Mode: Sync,Future,Batch
  • Click button “Generate Script”
  • Now you will see the script trigger button in the box and can copy to use it.

 

 

 

 

 

 

Was this article helpful to you? Yes No

How can we help?