How to append an object to attribute without removing old objects ?

Nessrine Hafi May 12, 2022

Hello Support Team,

I have two insight objects which are customers and purchases. In customers Object, you can find purchases as an attribute with unlimited cardinality.
What i've been trying to do is when adding a new purchase, that object will be added automatically to one of the Customers object that contains all Purchases objects. I will leave a picture to demonstrate what i'm trying to say.Technicolor.PNG

reference.PNG
And i found that insight has already an automation feature. but it was very limited.
I'm trying to write a script and i found documentation but it's emptying the list and only adds the new object.

That's why i want to check How to add a list of objects with groovy or simply append the new object  to the pre-existing list please ? 

Have a nice day

 

1 answer

1 vote
Amar Hanumantharaya
Contributor
May 17, 2022

I know what you are saying. Manually it is easy but through API its bit complex. I had to write a Workato recipe to automate this process. What I did was I queried the list and saved the list and added item to the list and finally updated the object with that list.

Suggest an answer

Log in or Sign up to answer