Recent searches


No recent searches

ZIS / Tcikets Fields and USer Fields



Posted Mar 14, 2024

Hello,

 

I'm trying to create a ZIS that will help my users.

In fact there's for each tickets a lot of information to put consult on Ticket and User Fields. To limit navigation, I created a ZIS that populate Ticket Fields from Relevant User Fields, and update user Fields if Ticket fields is changed. It works well except for Date. I thinks that it's related to Date Format. in Ticket Fields 

      {
                "id": 17336016451101,
                "value": "2024-03-04"
            },
            {

In User Fields

"date_of_birth": "0202-02-26T00:00:00+00:00",

and I use this to get Date: 

        "Champ_age_dob_of_client": {
                            "Type": "Action",
                            "ActionName": "zis:common:transform:Jq",
                            "Parameters": {
                                "expr": ".ticket.custom_fields[] | select(.id == 17336016451101) | .value |tostring ",
                                "data.$": "$.current_ticket"
                            },
                            "ResultPath": "$.Champ_age_dob_of_client",
                            "Next": "Champ_insurance1"
                        },
 
Do you know if I can challenge that?
 
Thanks
 

0

1

1 comment

image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hey Denis,
 
I think you're correct that the date here is likely causing issues here. Can you try updating the jq expression in the parameters object to format the user field date correctly?  Something like this should do the trick:
 
"Parameters": {
"expr": ".ticket.custom_fields[] | select(.id == 17336016451101) | .value | fromdate? | // empty | todateiso8601",
"data.$": "$.current_ticket"
},
 
Let me know if this help!
 
Tipene

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post