Solved

How to doa delete using perform_inbound_integration

  • 15 March 2024
  • 7 replies
  • 55 views

Userlevel 4
Badge +9
  • Sidekick (Partner)
  • 59 replies

Hi Experts,

Trivial question. How do I do a delete using a perform_inbound_integration? any particular key word that needs to be added to the payload?
 

 

icon

Best answer by SAMLK 15 March 2024, 04:43

View original

7 replies

Userlevel 4
Badge +12

Hi @Miraj 

Did you only check the allow delete option and unchecked the rest in the inbound settings? There is no special keyword as far as I can recall.

Userlevel 4
Badge +9

@SAMLK I didn’t have it setup with only the allow delete option. But to test your suggestion, I did that
 


But looks like it still tries to update
 

 

Userlevel 4
Badge +12

Hi @Miraj ,

Ah, I forgot to mention that there is a keyword as you correctly guessed, which you need to send in the payload in addition to the allow_delete option. The payload should have an attribute called delete=”TRUE”

example:

<task delete="true"><task_id>246</task_id></task>

 

However, I hope that you are aware of the consequences of allowing the delete transactions, as they are not really encouraged when it comes to the integrations specially with dependent transactions. :) 

 

Userlevel 4
Badge +9

@SAMLK Thanks.
I tried it and it worked as following,
 



A couple of things,

looks like there isn’t a way to get this to work with a map yeah?

and would you know the syntax for this in JSON?

 

Userlevel 4
Badge +12

@SAMLK Thanks.
I tried it and it worked as following,
 



A couple of things,

looks like there isn’t a way to get this to work with a map yeah?

and would you know the syntax for this in JSON?

 

Yes you can obviously make it work with a map if you just add the correct primary path in your xml map correctly. I have tried the above sample with a map. You don’t even need to call the map name or the perform message if you have a unique primary path defined in your xml map (in my case it’s //task). Framework will automatically select the corresponding map.

 

Calling from postman

the json formatted text for the above would be something like this according to the newtonsoft library (not quite sure whether it would work as I have not tried this out from json )

{"task":{"@delete":"true","task_id":"245"}}

 

Userlevel 4
Badge +9



Thanks @SAMLK 

I tested with the map option, but I think when you specify a primary path that is different to the table name, it doesn’t work , where it still tries to do an insert/update

 

 Attempt1 (without specifying the map) 
 

 
Attempt2 (map specified. Tries to do an insert)

Maybe you can try the same by changing the primary path to something else in your example..

Also, I tried the JSON syntax and it didn’t work. I guess that’s not supported :/

 


 

Userlevel 4
Badge +12

Hi @Miraj 

As you correctly said the primary table name needs to be added here for the primary path.  However as far as the news I have received, the deletes are not really supported from fsm connect unless you directly provide the above delete attribute + primary table. 

Yes the json syntax also might not work like you said. 

 

Reply