Skip to main content

How to delete blends from unfinished integrations in customer accounts using the SAAS api

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Mihai_David
Support
Support

How to delete blends from unfinished integrations in customer accounts using the SAAS api

Last Update:

Jul 28, 2021 4:52:08 PM

Updated By:

Jamie_Gregory

Created date:

Mar 31, 2021 8:03:42 AM

 

Whenever the setup process of an integration is started, a blend is created in the customer's account and will persist even if the setup is not successfully completed. In this article we will show you a simple way to remove these blends from unfinished integrations. To be more precise, we will create a blend that will check every blend in every account. Ok, let's get to it!

 

1. First we connect our "SAAS admin" datasource 

Capture.PNG

The "App Id" and "Api Key" can be found in My Hub -> API Key 

Capture1.jpg

 

2.  Then we create a new blend

Capture2.PNG

 

3. We add the following blocks from the "SAAS admin" connector: 

- "List Blends In Account"

- "List Accounts"

Capture3.PNG

 

4. Right now our blend retrieves all the blends for all the accounts, so we need to filter them based on the "setup_complete" property of the blend. If the value of this property is false, it means the setup was not completed. Alright, let's continue and add a "Condition" block.

Capture4.PNG

 

5.  Add a "Delete Blend From Account" block from the "SAAS admin" connector

Mihai_David_0-1617120663455.png

 

6. And finally the final step . Let's set a schedule for this blend

Mihai_David_1-1617120746318.png

 

Our blend is working great, but we didn't consider a special case. What happens if it runs when an integration's setup is in progress ?

Answer: The integration's blend will be deleted and will result in an error being displayed when the setup process is completed.

Mihai_David_2-1617121553506.png

 

7. To make sure this will not happen we will add a new condition to our "Condition" block that will check if the blend is at least a day old

Mihai_David_0-1617122658100.png

 

 

Tags (1)
Labels (1)
Version history
Last update:
‎2021-07-28 04:52 PM
Updated by: