How to create new Flows
Setup a Salesforce Flow
You can setup Flows via the Salesforce interface. First of all, you need to create a new flow in Salesforce. Make sure you have the required permissions to setup flows for your organization. Here's how:
Click on 'New Flow' on the top-right of the page.
Select 'Record-Triggered Flow' and click on 'Create to continue'.
Next, select the object and configure the trigger. Define a condition (e.g. an Opportunity reaching a certain Stage). You may update further field depending on how you want to configure your trigger.
Create External Credentials in Salesforce
After setting up the Trigger you need to create an external Credential in Salesforce, that allows to connect Salesforce and Valuecase. For more details, please also review the Salesforce help center. Here is how:
From the Salesforce Setup page, in the Quick Find box, enter 'Named Credentials', and then select 'Named Credentials' and then select 'External Credentials' and open the window to create a New External Credential.
Provide the required information to setup new credentials. You can find examples in the screenshot below.
Next, you'll need to create a principal. To get the Client ID and the Client Secret from Valuecase, in Valuecase open the Company settings and scroll to the bottom of your page to find your API credentials. Copy the information and paste them into the respective fields.
Then, you need to create a new Named Credential in Salesforce. Provide the inputs required on the Salesforce screen. You can find an example below.
Assign this credential to a Profile that will be running this Flow. You can do so via 'Profiles β (choose profile) β Enabled External Credential Principal Access' β enable the principal we created earlier.
Create new Action
Lastly, you can setup an action that is executed based on the previously defined trigger. Here's how:
From a Flow, select the Interaction > Action to open the menu that contains actions.
In the pop-up to define a new Action, select '+ Create HTTP Callout'.
Next, provide a Name, and if you like a Description for the New HTTP Callout. In the Named Credential dropdown select 'Valuecase API' or the name you've assigned to our API and click on next to continue.
Now, you can configure the HTTP call-out. Here you can setup any action that is supported by our API. The screenshot below shows the Create Space action as an example.
Provide a sample request to generate the request body type (can be taken from our API docs).
Similarly, provide sample response to generate the response body type.
For 'Value' create a new Resource by selecting the 'New Resource' option in the dropdown.
In the New Resource pop-up enter an API Name, a description and any other information that Salesforce requests from you. In the example below, a new resource type is created for Integration IDs.
Note: Use the type inferred from the request body to fill the 'Data Type' field.
Next, add a new assignment block in the beginning (to fill the integration ids).
Afterwards, also add a new assignment block before HTTP call (to fill in the request body).
Lastly, add a new to the flow that contains the Opportunity with the Space URL.
View the end result and add any additional steps you may want to add. Here's how it looks for the example created above.