Using Workflow to disable accounts in a specific source

I am building a workflow to disable account in a specific source on an attribute change. I am able to read and disable all accounts using GetAccounts and ManageAccounts Actions. However, I am not able to Loop through accounts and disable them only for a specific source ID.

Have anyone been able to build workflow using loop for the similar business process?

Any help will be appreciated.

Thank you
Haresh Patel

I

If you share your current workflow, it will be easier to suggest specific solution based on current config

Loop Input = $.getAccounts.accounts
Loop Context = $.getAccounts.sourceId

Compare String
Value1 = $.loop.loopInput.sourceId
Value2 = “Actual SourceID”

Manage Accounts
Disable Account
Select Accounts = $.loop.loopInput.accounts[*].id

If the workflow is handling a single identity and account needs to be deleted from just one source, then you don’t need to use the loop. You can simply apply a filter like
$.getAccounts.accounts[?(@.sourceId == '2c9180835d2e5168015d32f890ca1581')].id and use it as input to Manage Accounts action

Replace 2c9180835d2e5168015d32f890ca1581 with actual Source ID

Thank you very much for your help.

This change did the trick. However, I wonder what’s wrong with the loop? Anyway to make that work?

try this
$.loop.loopInput.id
instead of

For some reason, test workflow shows no input for compare string step

Thanks for all your help.

Even though I don’t see any data in compare string step, it actually works.

Yeah you don’t see the data for steps inside a loop… time to mark the response as Solution? :smiley:

yeah. Just marked it. Thanks.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.