Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Using a dynamic ID from Salesforce in Salesforce Input Data

NathanOch
8 - Asteroid

This may be relatively unknown in Alteryx, but I figured I would see if anybody could help. A little background first. We want to call workflow from Salesforce when a user hits a button. That button will send, via api, an ID from the Salesforce object to a workflow I have built. The api process will be built out by software programmers at a later date. Then that ID would ultimately be used in the 'WHERE' statement of the Salesforce Input tool to get only the data associated with that particular ID. The workflow will run using only that ID's data and then send back a result to Salesforce via the api process. Currently, I am trying to understand the part of this process where the dynamic ID value from Salesforce can then be used in the workflow Salesforce Input tool. Below is a picture of the part of the workflow I am currently struggling with in designer. I am using a simple text box as the input for right now, and will replace it will the value from the api when the time comes.

 

My question is, what is the correct process to get the value from the PASS_ID text box (ex. a2C5b000002iPGP) into the Salesforce Input node and run it successfully, only getting that ID's data back from SF?

 

SF_Dynamic_Input_ID.PNG

 Note: I am using the deprecated version of the SF input on purpose.

6 REPLIES 6
mbarone
16 - Nebula
16 - Nebula

Can you show us a screen shot of the Salesforce Input Tool as well as the Action tool?  Are you "hardcoding" the URL, Username, and PW into the SF tool?  What you want to do should be fairly straight forward, as long as you have the creds coded or passed in as part of the parameters.

NathanOch
8 - Asteroid

Yes, absolutely. The following is a screen shot of the Salesforce Input tool. I am using a service account we have in Salesforce for the credentials.

 

NathanOch_2-1606334265781.png

 

 

Here is the action node where I want to replace the @PASS_ID value from the text box in the Salesforce Input Tool WHERE statement.

 

NathanOch_1-1606334215729.png

 

My text box specs:

 

NathanOch_3-1606334297527.png

 

 

mbarone
16 - Nebula
16 - Nebula

Your set up should be fine - it looks like it's the action tool.  You have the wrong line highlighted.  Instead of the blue line, highlight the one above it, and replace just the value in quotes (a3C5b.....), so your "replace a specific string" is just the ID characters without any quotes.

 

2020-11-25 15_48_45-Re_ Using a dynamic ID from Salesforce in Salesfor... - Alteryx Community.png

NathanOch
8 - Asteroid

 Thank you @mbarone for your response, it is greatly appreciated! I understand that methodology so I will try and put it into practice.

mbarone
16 - Nebula
16 - Nebula

Welcome, glad you got it working!

pfiskrat
7 - Meteor

Interestingly, the opposite of this was the solution that worked for me. Maybe this is because I am using the "Query Builder" option on the Salesforce Input tool.

 

When selecting the "where - value"  line in the Action tool and doing some Test Views in the Interface Designer; I noticed that only the meta-data of the tool was being updated - the tool was showing the correct information in the 'WHERE Clause (SOQL)' section but clearly submitting the old value when running the workflow (based on the results). Furthermore, simply adding a space and removing a space to the SalesForce tool's WHERE clause and running the Test View debug workflow again produced the correct results.

 

For me, I adjusted this to select the "query - value" line and this solved my problem. Hopefully this information will help someone else.

 

Labels