Skip to main content
March 28, 2025
Solved

Create 2 Record Types within 1 single json

  • March 28, 2025
  • 2 replies
  • 0 views

Hi everyone.

I have a json providing by a WebService like this :

[
{
"id": 1,
"title": "Essence Mascara Lash Princess",
"reviews":
[
{
"rating": 2,
"reviewerEmail": "john.doe@x.dummyjson.com"
},
{
"rating": 2,
"reviewerEmail": "nolan.gonzalez@x.dummyjson.com"
},
{
"rating": 5,
"reviewerEmail": "scarlett.wright@x.dummyjson.com"
}
],
"returnPolicy": "30 days return policy"
},
{
"id": 2,
"title": "Eyeshadow Palette with Mirror",
"reviews":
[
{
"rating": 4,
"reviewerEmail": "liam.garcia@x.dummyjson.com"
},
{
"rating": 1,
"reviewerEmail": "nora.russell@x.dummyjson.com"
},
{
"rating": 5,
"reviewerEmail": "elena.baker@x.dummyjson.com"
}
],
"returnPolicy": "30 days return policy"
}
]

I want to create a Record Type for the fields of the first level: id, title, returnPolicy

After that I want to create another Record Type for the fields of the second level of field "reviews" adding the id field of the first level to link both Record Types: id (belonging to the first level fields) , rating, reviewerEmail

Moreover, the sync has to work for these two RecordsType. The question is: Can I create these two Record Type calling the same WebService or I need one with the first level fields an another to the second level fields to create separately the two Record Types?

Thanks in advance!

    Best answer by stefanhelzle0001

    I think the data Appian expects from a sync source expression needs to be a list of one data type and not nested. But I never spend time in investigating this deeper.

    2 replies

    stefanhelzle0001
    March 28, 2025

    I think the data Appian expects from a sync source expression needs to be a list of one data type and not nested. But I never spend time in investigating this deeper.

    mathieud0001
    March 29, 2025

    If you want to maintain the 1 to many relationship, you will need 2 distinct Record Types synced for both lists and then set the relationship between both Record Types. It really depends on how the API that you are consuming is configured. You can technically use the same API/Integration with 2 recordDataSource expressions.