Export of wrapupcodemappings missing IDs

When I export genesyscloud_outbound_wrapupcodemappings from our staging environment I am not getting all of the IDs required for import. Many of the mappings look like this

  mappings {
    flags = ["Right_Party_Contact", "Contact_UnCallable"]
  }

When I attempt to import them I get an error
The argument "wrapup_code_id" is required, but no definition was found.

The exported values should look like this, right?

  mappings {
    flags          = ["Right_Party_Contact"]
    wrapup_code_id = "${genesyscloud_routing_wrapupcode.BR-Onboarding_Other_443570995.id}"
  }

I am using the latest version of the Genesys provider 1.16.0. Any suggestions? Do I have orphaned mappings?

Hi Jason

I am also seeing this when I export wrap up code mappings. It seems to be coming from the fact that GET /api/v2/outbound/wrapupcodemappings returns multiple wrap up code IDs which cannot be retrieved directly, as in they return a 404 on GET /api/v2/routing/wrapupcodes/{codeId}. Do you mind confirming that you are seeing this behaviour also?

We will open a ticket to investigate and get a fix out to you as soon as we can.

Thanks
Charlie

Confirmed. Example output of wrapupcodemappings GET

        "9f409610-5bc0-47e0-af06-d59b22e6c392": [
            "Contact_UnCallable",
            "Right_Party_Contact"
        ],
        "7798bd92-57c8-4eec-a0a7-b93a80972da2": [
            "Right_Party_Contact"
        ],

The reply for the dual-mapping (404)

{
    "message": "WrapupCode 9f409610-5bc0-47e0-af06-d59b22e6c392 does not exist.",
    "code": "resource.not.found",
    "status": 404,
    "messageWithParams": "{entity} {id} does not exist.",
    "messageParams": {
        "id": "9f409610-5bc0-47e0-af06-d59b22e6c392",
        "entity": "WrapupCode"
    },
    "contextId": "125677be-80b0-410a-a933-fb8e1f1ea6b4",
    "details": [],
    "errors": []
}

The reply for the single mapping

{
    "id": "7798bd92-57c8-4eec-a0a7-b93a80972da2",
    "name": "BR-Left Message",
    "dateCreated": "2023-03-01T23:22:34.053Z",
    "createdBy": "ee91913b-3cc4-49bd-8bd9-c634c7796b0f",
    "selfUri": "/api/v2/routing/wrapupcodes/7798bd92-57c8-4eec-a0a7-b93a80972da2"
}

I appreciate your help here.

Any chance there is an update on this?

Hi Jason

Unfortunately not. The ticket for this bug is currently assigned to a dev and is in the backlog. This looks like an API issue rather than it being a mistake on the terraform end, so I can't give an ETA right now.

However, I will look into implementing a temporary work around. If we decide to take this approach, we could have the bug fix out on the next release.

I will keep you posted.

Hi Jason,

We have investigated the issue and found that many years ago there was a problem when deleting wrap up code mappings which might be causing your issue with the dead ID's being returned. You will have to open a ticket with Genesys cloud care to have the issue investigated further and have it resolved. When you do that could you drop your ticket number here.

Regards,
Declan