Jump to content

logServiceRequest - struggling with questionFieldMap and connectionMap


Recommended Posts

Good morning,

I am looking to log tickets using the logServiceRequest API via Microsoft Flow but I am struggling with the two fields - questionFieldMap and connectionMap.

I have looked on the forums at other topics talking about questionFieldMap and tried the suggestions in there, but none of them work now.

1. When logging a Service Request, it uses pc2LogProCapture instead of logServiceRequest - and there are too many extra fields that I think it would be difficult to get the details from (icons, profile pictures) so it's difficult to replicate this and get it to work

2. Details on how to populate the questionFieldMap from other forum posts, provides the mapping but in testing it doesn't work with an error, something about child element mapping not being right or something.

3. There are no details anywhere on how to define the connectionMap

Please can someone advise.

Here is the latest request body - this works if I remove questionFieldMap and connectionMap then run the request in Postman

{
    "@service": "apps/com.hornbill.servicemanager/ServiceRequests",
    "@method": "logServiceRequest",
    "params": {
        "summary": "Set up Application access for testing",
        "description": "",
        "requestType": "Service Request",
        "customerId": "samwoo",
        "customerType": "0",
        "teamId": "HornbillTesting",
        "status": "status.new",
        "priorityId": "7",
        "categoryId": "424",
        "categoryName": "Application",
        "sourceType": "Request",
        "sourceId": "SR00139481",
        "serviceId": "153",
        "catalogId": "526",
        "catalogName": "Application Access [Linked Request]",
        "bpmName": "wbc-imt-application-access-request",
        "questionFieldMap": [
            {
                "form_id": "custom_details",
                "question": "Asset ID",
                "question_id": "h_custom_a",
                "answer": "2229",
                "field_type": "text",
                "entity_type": "request",
                "hbfield": {
                    "question": "Asset ID",
                    "field": {
                        "id": "h_custom_a",
                        "defLabel": "Asset ID",
                        "transLabel": "x",
                        "binding": "global.test.h_custom_a",
                        "noInvisibleValue": false,
                        "design": {
                            "isVisible": true,
                            "isMandatory": false,
                            "isReadOnly": false,
                            "showIfEmpty": false,
                            "extraClass": " "
                        },
                        "control": {
                            "type": "text"
                        },
                        "uid": "field-1-1"
                    },
                    "value": "2229"
                }
            },
            {
                "form_id": "custom_details",
                "question": "Asset Name",
                "question_id": "h_custom_b",
                "answer": "Testing App",
                "field_type": "text",
                "entity_type": "request",
                "hbfield": {
                    "question": "Asset Name",
                    "field": {
                        "id": "h_custom_b",
                        "defLabel": "Asset Name",
                        "transLabel": "x",
                        "binding": "global.test.h_custom_b",
                        "noInvisibleValue": false,
                        "design": {
                            "isVisible": true,
                            "isMandatory": false,
                            "isReadOnly": false,
                            "showIfEmpty": false,
                            "extraClass": " "
                        },
                        "control": {
                            "type": "text"
                        },
                        "uid": "field-2-1"
                    },
                    "value": "Testing Name"
                }
            }
        ],
        "connectionMap": {
            "connection.newManager": [
                {
                    "userId": "samwoo",
                    "userType": "account",
                    "display": "Samuel Wood (<hidden>)",
                    "comment": ""
                }
            ]
        }
    }
}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...