Hi, my module returns fields in a collection format.
I need to use these fields in the next module, but I can’t…
What should I do?
I tried using the iterator, but it didn’t work.
Here’s my output:
[
{
“id”: 9096168,
“name”: “Resultante engenharia Ltda”,
“price”: 6391,
“responsible_user_id”: 12109343,
“group_id”: 0,
“status_id”: 143,
“pipeline_id”: 9761215,
“loss_reason_id”: null,
“created_by”: 12079419,
“updated_by”: 12109343,
“created_at”: “2024-10-17T17:09:52.000Z”,
“updated_at”: “2024-10-22T19:06:33.000Z”,
“closed_at”: “2024-10-22T19:06:33.000Z”,
“closest_task_at”: null,
“is_deleted”: false,
“custom_fields_values”: [
{
“field_id”: 769354,
“field_name”: “Prazo de entrega”,
“field_code”: null,
“field_type”: “date”,
“values”: [
{
“value”: 1729134000
}
]
},
{
“field_id”: 769444,
“field_name”: “Cupom do vendedor(a)”,
“field_code”: null,
“field_type”: “text”,
“values”: [
{
“value”: “RSV3762”
}
]
},
{
“field_id”: 769446,
“field_name”: “Loja do vendedor(a)”,
“field_code”: null,
“field_type”: “select”,
“values”: [
{
“value”: “RESERVA GO BARRA”,
“enum_id”: 668118,
“enum_code”: null
}
]
},
{
“field_id”: 769448,
“field_name”: “Nome do vendedor(a)”,
“field_code”: null,
“field_type”: “text”,
“values”: [
{
“value”: “Erickson Antônio Villas boas de Vasconcellos”
}
]
},
{
“field_id”: 769450,
“field_name”: “Telefone do vendedor(a)”,
“field_code”: null,
“field_type”: “numeric”,
“values”: [
{
“value”: “5521980854646”
}
]
},
{
“field_id”: 769454,
“field_name”: “Supervisor(a)”,
“field_code”: null,
“field_type”: “select”,
“values”: [
{
“value”: “Hugo Maia”,
“enum_id”: 668186,
“enum_code”: null
}
]
},
{
“field_id”: 772520,
“field_name”: “Comentário para o vendedor(a)”,
“field_code”: null,
“field_type”: “text”,
“values”: [
{
“value”: “Oiee! O vendedor Juliana Aguiar Vianna já começou a atender o seu pedidooo!”
}
]
}
],
“score”: null,
“account_id”: 33604375,
“labor_cost”: null,
“_links”: {
“self”: {
“href”: “https://vistasuaempresa.kommo.com/api/v4/leads/9096168?with=catalog_elements%2Closs_reason%2Ccontacts&limit=250&filter[pipeline_id]=9761215&order[updated_at]=asc&page=1”
}
},
“_embedded”: {
“tags”: [
{
“id”: 31734,
“name”: “Importação clickup 17/10/2024”,
“color”: null
}
],
“catalog_elements”: ,
“loss_reason”: ,
“companies”: [
{
“id”: 4989572,
“_links”: {
“self”: {
“href”: “https://vistasuaempresa.kommo.com/api/v4/companies/4989572?with=catalog_elements%2Closs_reason%2Ccontacts&limit=250&filter[pipeline_id]=9761215&order[updated_at]=asc&page=1”
}
}
}
],
“contacts”: [
{
“id”: 4989742,
“is_main”: true,
“_links”: {
“self”: {
“href”: “https://vistasuaempresa.kommo.com/api/v4/contacts/4989742?with=catalog_elements%2Closs_reason%2Ccontacts&limit=250&filter[pipeline_id]=9761215&order[updated_at]=asc&page=1”
}
}
}
]
},
“IMTLENGTH”: 2,
“IMTINDEX”: 1
},
Oie, o meu módulo retorna campos em formato de coleção.
Preciso usar esses campos no módulo seguinte, mas não consigo…
O que fazer?
Tentei usar o iterator, mas não deu certo.
Minha output: