Think. Build. Salesforce Solutions.

Salesforce Consulting Services across Salesforce Clouds & Across App Lifecycles

Blog

How to Publish and Subscribe in Salesforce Platform Event using Dell Boomi?

By |2023-11-15T07:14:51+00:00September 26th, 2023|

In the ever-evolving landscape of data integration, Salesforce Platform Events offers a powerful mechanism to broadcast and consume real-time data updates. When combined with Dell Boomi’s robust integration capabilities, organizations can streamline their processes and enhance their overall efficiency. In this blog post, we’ll walk you through the process of publishing and subscribing to Salesforce Platform Events using Dell Boomi.

Prerequisites:

1. Create/Have a Salesforce account.

  • Go to the Salesforce website by visiting https://login.salesforce.com/?locale=in.
  • Click on the “Sign Up” or “Try for Free” button.
  • Fill in your personal details, including your email address, and then proceed with the sign-up process.
  • You will receive an email from Salesforce containing instructions on how to set up your account and reset your password if necessary.

2. Create/Have a Dell Boomi Account.

  • Visit the Dell Boomi website at https://platform.boomi.com/.
  • Click on the “Sign Up” or “Free Trial” button.
  • Provide your First Name, Last Name, business email address, and any additional required details.
  • Submit your information.
  • You will receive an email confirmation with instructions on how to set up your Dell Boomi account and reset your password if needed.

3. Basic knowledge of Dell Boomi and Salesforce.

Salesforce:

Salesforce documentation: https://developer.salesforce.com/docs/

Dell Boomi:

Dell Boomi Integration documentation: https://help.boomi.com/category/integration

Here are the steps for how to Publish and Subscribe to the Salesforce Platform Event using Dell Boomi:

Step 1: Salesforce Platform Event:

Platform events empower developers to convey secure, scalable, and tailored event notifications within the Salesforce platform or from external origins.

Salesforce Platform Event

1. Create Platform Event in Salesforce:

  • Open your Salesforce Account.
  • Click on Setup:  Search Platform Events in Quick Find Box.
  • Click on the New Platform Event Button.

Salesforce Platform Event

  • Give the Label, Plural Label, and Publish Behaviour – Publish After Commit.
  • Deployment Status – Deployed.
  • Save

2. Create two Custom Fields in the Salesforce Platform Event:

1. Go to the Custom Field and Relationship section then Click on the New button.
2. Create the first field Order Number that the data type is Text (20).
3. Create a second field Status that the data type is Number (1,0).

  • Value 0 in Status is Pending.
  • Value 1 in Status is Ready to Ship.
  • Value 2 in Status is Shipped.
  • Value 3 in Status is Delivered.
  • Value -1 in Status is Delivery Failed.

Structure of the Salesforce Platform Event:

3. Create a Custom Order Object:

1. Click on Setup – Click on Object Manager.
2. Create a New Order Custom Object.
3. Create a field Name with an Auto Number.
4. Create a second field status with Picklist.

  • Pending
  • Ready to Ship
  • Shipped
  • Delivered
  • Delivery Failed

4. Create a Trigger and TriggerHandler for Pulish on Order Object:

OrdersTrigger on Order Object:

Platform Event in Salesforce

OrderTriggerHandler on Order Object:

Salesforce Platform Event

Publish the Salesforce Platform Event in Salesforce:

  • Create a New Order with the Status is Read to Ship.
  • When you create a new order then run the trigger and publish the record.

5. Create a Trigger on Platform Event when Status changes 2 or shipped and create a task.

  • OrderShppingNotificationTrigger on Platform Event( Order_Shipping_Notification__e):

Salesforce Platform Event

  • OrderShippingServices:

Salesforce Platform Event

6. Create a Flow for Subscriber Platform Event when order is Delivered and Delivery Failed:

  • Create Platform Event–Triggered Flow – Choose your platform event.

Salesforce Platform Event

  • Add the decision and the check will be delivered. Then update the delivered
    order status record.
  • Resource – Status field of Platform Event.
  • Value – Create a new resource with a constant value is 3.

Salesforce Platform Event

  • Update the order status record if the delivered condition is satisfied.

Salesforce Platform Event

  • Add the new decision and the check will be delivery failed if the delivered condition is not satisfied.
  • Resource – Status field of Platform Event.
  • Value – Create a new resource with a constant value is -1.

Salesforce Platfrom Event

  • Update the order status record if the delivered failed condition is satisfied.

Salesforce Platform Event

Step 2: Salesforce Connect App in Salesforce:

2. Create a Salesforce Connect App in Salesforce:

  • Create a Salesforce Connect App in Salesforce for using Salesforce Platform Event Connector in Boomi.
  • Go to Setup – Quick Find Box – App Manager – Click new Connected App.
  • Use Callout like this: https://platform.boomi.com/account/<your__account_ID>/oauth2/callback where <your__account_ID>
  • Like Your_account__ID is – Go to your Dell Boomi Settings – Account Information and Setup – Account Information.

Salesforce Platform Event

Step 3: Create a Process in Dell Boomi for Subscribing in Salesforce Platform Event:

Create a Salesforce Connector and Operation in Boomi:

  1. Salesforce Connector:
  • Connections: Retained and New Events.
  • OAuth 2.0
  • Client ID: Consumer Key of your salesforce-connected App.
  • Client Secret: Consumer Secret of your salesforce-connected App.
  • Access Token: Click Generate – Allow.
  • Save and Close.

2. Salesforce Operation:

  • Import – Chose Event – Next – Finish.
  • Save and Close.

Process in Dell Boomi:

Salesforce Platform Event

 

Step 1: Start with No Data.

Step 2: Add Message JSON Format. // Give JSON for Subscribe the Platform

Event.
‘{
“Order_Number__c”:”O-0002″,
“Status__c”:”2″
}

Step 3: Create a Map.

Salesforce Platform Event

Step 4: Add Salesforce Platform Event Connection

Step 5: End and Continue.

Conclusion:

Salesforce Platform Events and Dell Boomi blend seamlessly to simplify real-time data integration. By following these straightforward steps, you can seamlessly publish and subscribe to Platform Events using Dell Boomi. This combination empowers your organization with efficient, instantaneous data communication, revolutionizing your workflows and decision-making processes.

 

Leave A Comment