Skip to content

Latest commit

 

History

History
139 lines (71 loc) · 4.95 KB

File metadata and controls

139 lines (71 loc) · 4.95 KB

Salesforce REST API

This connector uses the Salesforce REST API and provides a way to access Salesforce resources and manipulate objects.

This connector:

  • uses the REST API to process a Salesforce opportunity.
  • tracks the status of opportunities
  • manipulates opportunities using the Salesforce Object Query Language (SOQL).

Demo

  1. Login to the Axon Ivy platform
  2. Click Starts in the Axon Ivy menu to open the available process starts
  3. Click on ChartDemo.

process-start-chart

  1. The connector fetches all Salesforce opportunities via the REST API and display them as a bar chart

simple-chart

  1. Click on ListDemo.

process-start-list

  1. In this demo the connector displays the opportunities as list:

list-opportunity

  1. Click on the "Add New" button:

add-new-opportunity

  1. Add a new opportunity:

add-new-opportunity-popup

  1. Click on Opportunity Name to view details:

add-new-opportunity-summary

  1. Opportunity details:

opportunity-details-dialog

  1. Opportunity details Activity:

opportunity-details-activity

  1. Click on the icon "Pencil" to update an opportunity:

modify-opportunity

  1. Edit opportunity:

modify-opportunity-popup

  1. Click on the icon "Trash" to remove an opportunity:

delete-opportunity

  1. Delete opportunity:

delete-opportunity-popup

Setup

Configuration on Salesforce side

For a client application to access REST API resources, it must be authorized as a trusted visitor. To implement this authorization, utilize a Connected App and employ the OAuth 2.0 authorization flow.

Important steps

  1. Create a Connected App to generate the necessary authentication information
  • Go to Setup -> Apps -> App Manager -> click on button New Connected App

    new-connected-app

  • Input all needed information

    input-connected-app-info

  • Generate Consumer key And Consumer secret

    consumer-key-and-secret

  • Configure Client credential flow

    client-credential-flow-user

  1. Configure authentication providers for your application
  • Go to Setup -> Auth.provider -> New

    auth-provider

  1. Activate the required settings in OAuth and OpenID Connect settings to facilitate secure authentication
  • Go to Setup -> OAuth and OpenID Connect Settings -> Enable checkboxes

    oauth-and-openId

  1. Set up Named Credentials to manage and secure access to external services
  • Go to Setup -> Named Credentials -> New legacy

    named-credential

Integrate the connector into your project

The Consumer Key and Consumer Secret are retrieved from the Connected App and placed in the variables.yaml file.

Authentication information is set up as a global variable and can be updated anytime.

Variable name Note Example
salesforce-connector.auth.subdomain The domain that Salesforce provides to consumers for authentication axonactive3-dev-ed.develop
salesforce-connector.auth.clientId Consumer Id 3MVG95mg0lk4bathQF4Z_F1GcZZPr8ztvo29c53HhwOXnCKBkP8LkxHnb5KlydXj3Oomw0VHsY
salesforce-connector.auth.clientSecret Consumer Secret 56C6CA448B49032828FE4C4DF16D1AF4804B8CC734E066B255A5B31A
salesforce-connector.auth.useAppPermissions OAuth2 Grantype true (client_credentials)
salesforce-connector.auth.url Salesforce Rest URI https://axonactive3-dev-ed.develop.my.salesforce.com/services/data/v58.0

Resources

Developer

Connected App

Salesforce SOQL