Question

Dynamic Objects Help

  • 20 January 2024
  • 2 replies
  • 108 views

Badge +1

Hey all,

We thought we were utilizing all of Front’s features…. until today when we learned about dynamic objects - mind blown!  Since I am not a developer, we’re seeking any tips, tricks or help articles for how to configure a dynamic variable when the Target URL doesn’t include the “text pattern.” For example, I’d like to create a dynamic variable for our Order numbers, but our Salesforce link doesn’t actually ID the order number in the URL. 

Thanks for any advice!


2 replies

Userlevel 1
Badge +5

Hi Annie,

If you’re able to access the Salesforce API, then you can watch this video tutorial as an example to see how to utilize an API and Front’s dynamic objects to create links in conversations by fetching the Salesforce field that you need: https://dev.frontapp.com/docs/no-code-dynamic-object. (the tutorial uses Shopify but you can adapt it to Salesforce)

The basic idea is that you’ll identify the order ID via the dynamic object, and then make an API call to the Salesforce API to retrieve the URL for that order. This will require some amount of technical setup, but the team is thinking through ways to simplify this in the future, perhaps through integrations with popular systems like Salesforce that would have the technical stuff preconfigured for you.

Userlevel 2

Hey @annie , based on the above response, I looked into retrieving the URL from Salesforce since it looked like an interesting challenge. You are right that the Order ID/Number is not included in the salesforce URL however the Salesforce URL has the record ID which is Salesforce's unique identifier fro each record. 
There are multiple ways of retrieving this URL for use in a Dynamic Object however what I think is most straightforward is this : 
- Create a Formula field in salesforce that joins the base URL with the Record Id of the Order ( For guidance see : https://salesforce.stackexchange.com/questions/399100/how-do-i-get-the-correct-record-url-when-viewing-between-object-list-view-and-re)
- Use the API functionality as shown in the example in the response to make an API call to Salesforce. This API call will contain a query (SOQL) that provides the OrderID/Number and the URL in the formula will be returned. Assuming thr formula field you created is called OrderURL, then the API call would lookm something like this : 

curl https://YourDomainName.my.salesforce.com/services/data/v60.0/query/?q=SELECT+OrderURL+from+Orders+ Where+OrderID+=+YourOrderID -H "Authorization: Bearer token" . Of course you would add the correct authentication credentials to this request.  This API call would return the URL. 

Input the returned URL into the Target URL text field under "Link to a URL" section of the Configure Dynamic object object page. 

A couple of other ways of doing this involve using an ExternalID instead of a formula field in Salesforce , but you would still make the API call to retrieve the URL.

So far, this is all theoretical. I intend to try it out on Salesforce instance and if successful, I will respond and put together an article detailing the steps to follow. 

Reply