ZIS - ticket.CustomFieldChanged

6 コメント

  • Ahmed Zaid
    User Group Leader Community Moderator
    Zendesk Luminary

    Hello Denis MENARD,

    You would need to add a Choice state to your flow to compare $.input.ticket_event.custom_field.id to your custom field id. According to the documentation, you should use NumericEquals operator.

    "IsItMyFiled": {
      "Type": "Choice",
      "Choices": [
        {
        "Variable": "$.input.ticket_event.custom_field.id",
        "NumericEquals": 1234567890,
        "Next": "YesProcessValue"
      }
      ],
    "Default": "NoEndFlow"
    }

    I haven't tested this so I really hope it works :)

    0
  • Denis MENARD

    Hello, 

     

    Thanks for your feedback, but my trigger has to start when the value of this ticket field change.

    So do I have yo put

       {
        "Variable": "$.input.ticket_event.custom_field.id",
        "NumericEquals": 1234567890,
    "Variable2': $.input.ticket_event.custom_field.value"
    "StringEquals":"myvalue"
        "Next": "YesProcessValue"
      }
    0
  • Ahmed Zaid
    User Group Leader Community Moderator
    Zendesk Luminary

    Hi Denis MENARD,

    No that won't work. You can expand the Choice step with logical operators AND/OR/NOT. For simplicity and readability, you can just use a second Choice step:

    "IsItMyFiled": {
      "Type": "Choice",
      "Choices": [
        {
        "Variable": "$.input.ticket_event.custom_field.id",
        "NumericEquals": 1234567890,
        "Next": "YesCheckValue"
      }
      ],
    "Default": "NoEndFlow"
    },
    "YesCheckValue": {
      "Type": "Choice",
      "Choices": [
        {
      "Variable": "$.input.ticket_event.current",
      "StringEquals": "myvalue",
      "Next": "YesContinue"
    }
      ],
    "Default": "NoEndFlow"
    }
    0
  • Denis MENARD

    Top, It's working!

     

    thank you!

    0
  • Denis MENARD

    Progressing, but blocked now.

    I did that :

      "definition": {
                        "StartAt": "checkfield",
                        "States": {
                            "checkfield": {
                                "Type": "Choice",
                                "Choices": [
                                    {
                                        "And": [
                                            {
                                                "Variable1": "$.input.ticket_event.custom_field.id",
                                                "NumericEquals": 14113959816477
                                            },
                                            {
                                                "Variable2": "$.input.ticket_event.current",
                                                "StringEquals": "cancel_agreement"
                                            }
                                        ],
                                        "Next": "Get_Agreement_ID"
                                    }
                                ],
                                "Default": "CheckValue2"
                            },
                            "CheckValue2": {
                                  "Type": "Choice",
                                "Choices": [
                                    {
                                        "And": [
                                            {
                                                "Variable3": "$.input.ticket_event.custom_field.id",
                                                "NumericEquals": 14113959816477
                                            },
                                            {
                                                "Variable4": "$.input.ticket_event.current",
                                                "StringEquals": "send_agreement"
                                            }
                                        ],
                                        "Next": "Get_Ticket"
                                    }
                                ],
                                "Default": "Finish"
                            },
     
     
    But the cancel is not working, and my workflow never go in step "get_agreement_ID" step.
    Do you know why?
     
    Logs: 
     "message": "Execution Successful",  "fields": {    "account_id": ,    "began_at": "2023-10-20T14:57:44Z",    "emitted_by": "zis-engine",    "ended_at": "2023-10-20T14:57:44Z",    "execution_states": [      "CheckStatus",      "CheckValue",      "Finish"    ],    "flow_name": "zis:sg_adobe3:flow:ticket-created-flow",    "input": {      "ticket_event": {        "current": "cancel_agreement",        "custom_field": {          "field_type": "tagger",          "id": 14113959816477,
    0
  • Ahmed Zaid
    User Group Leader Community Moderator
    Zendesk Luminary

    Hi Denis MENARD,

    They choices in Choice state should have "Variable" key. You added "Variable1" and "Variable2" instead. I hope that helps.

    0

サインインしてコメントを残してください。

Powered by Zendesk