Whats in this article
This article describes the automation of Streamboxy from Salesforce, i.e. Creation or Configuration of Events, Users, Session start etc.
Check the Salesforce Integration Overview article for an overview regarding all functionality of the Salesforce integration.
Requirements for the integration
The following points are required for a STREAMBOXY-Salesforce integration:
- Existing Salesforce environment
- A STREAMBOXY Tenant wit valid Subscription and Tenant Admin permissions
Setup the Integration
Step 1 - STREAMBOXY - Navigate to the Integrations section
In the Tenant settings in the STREAMBOXY Backstage, click on "Integrations" in the left navigation bar. In this tab, all platforms that are currently possible to integrate are listed - including Salesforce.
Click on Configure.
Step 2 - STREAMBOXY - Enable the Salesforce Access to STREAMBOXY
In the Salesforce Integration Dialog click on "Allow Salesforce to access Streamboxy (via External Service)" and click on "Save".
Leave the window open or copy the following values to a different location, you'll need them when you configure the Salesforce environment:
- Salesforce External Service API Key
- Salesforce External Service URL
- Salesforce External Service - Tenant Specific API Schema (OpenAPI / Swagger)
Step 3 - Salesforce - Create new External Credential
You'll find additional documentation regarding this step in the Salesforce Documentation: https://help.salesforce.com/s/articleView?id=sf.external_services_define_named_credential.htm&type=5
a) Log into your Salesforce Org and open up Setup
b) Search Setup for Named Credentials, switch to the "External Credentials" Tab and click on "New"
c) Enter the External Credential Details into the "New External Credential" Form and klick Save.
Label: Streamboxy External Credential
Name: StreamboxyExternalCredential
Authentication Protocol: Custom
You can enter different Values for the Label and Name field, but you need to keep them consistent within the following step.
d) Now you can create a Custom Header for the newly created External Credential by clicking "New" at the Custom Headers Section
e) In the Custom Headers Form Enter the following Values and click Save
Name: Authorization
Value: Basic {!$Credential.StreamboxyExternalCredential.ApiKey} (Using this placeholder the ApiKey Credential will dynamically be picked using the Permission set mapping we create in the next step)
Important: If you chose a different Name for the External Credential you need to adjust the Value here according to the Name you selected
f) Now you can Create a Permission Set Mapping for the External Credential and click Save
Permission Set:
Choose the Permission
Set which is also assigned to all publishers of Salesforce Flows who should be
able to use the Streamboxy API Integration.
Important: If the user who triggers the flow does not have the permission set assigned, the flow will fail.
Sequence Number: 1
Identity Type: Named Principal
Authentication Parameter 1 - Name: ApiKey
Authentication Parameter 1 - Value: The "Streamboxy External Service API Key" value copied from the Streamboxy Salesforce Integration Dialog
g) The External Credential Configuration is completed now and should look similar to the following screenshot.
Step 4 - Salesforce - Create new Named Credential
a) Click on Named Credentials in Setup again, stay on "Named Credentials" Tab and click on "New"
b) Fill the "New Named Credential" form with the following Values and click Save.
Label: Streamboxy Named Credential (or something of your preference)
Name: StreamboxyNamedCredential (or something of your preference)
Url: Salesforce External Service Url from th Streamboxy Salesforce Integration Configuration Dialog
External Credential: Select the External Credential created in the previous step
Allow Formulars in HTTP Header: true
Step 5 - Salesforce - Create new External Service
a) Search Setup for "External Services" and click on "New External Service"
b) In the Add ab External Service Dialog select "From API Specification"
b) Fill the "Add an External Service" Form with the following Values and click Save & Next.
External Service Name: StreamboxyExternalService (or something of your preference)
Service Schema: Complete JSON
Select a Named Credential: The Named Credential you created in the previous step
JSON: Paste
the JSON from the "Salesforce External Service - Tenant Specific API schema (OpenAPI / Swagger)" field from the Streamboxy Salesforce Integration configuration dialog here.
c) Select the operations you need in your integration (or simply all) and click Next.
Commonly used operations (get, put, post, patch, delete) are:
- Event
- EventUser
- EventSession
- EventSessionUser
- TenantUser
c) Review the external Service actions and click "Done"
Step 6- Finish
You have now set up everything to start using Streamboxy as an external Service.
Use the External Service
You can use the external Service in a variety of ways like from a Flow, Using Apex Callouts, Einstein Bots etc.
You'll find som common examples using flow in the Flow Samples article.
Custom Properties and the Salesforce Integration
Streamboxy supports custom properties which work similar to custom fields in Salesforce and support additional Data for Events, Sessions and Tenant users.
Custom Properties can be defined individually for each Streamboxy tenant and are also part of the Swagger definition.
In case you updated the custom Properties in Streamboxy, you need to update the External Service definition by retrieving the current Swagger JSON from Streamboxy and updating it in the external Service.