Create a feedback

With the createFeedback mutation you can easily create a feedback in your Cycle workspace from wherever you want (e.g: mobile app, web app, ...)

1. Create a personal access token

mutation createToken {
  createAccessToken(label: "In App Integration") {
    id
    token
    label
  }
}

2. Use the createFeedback mutation

The createFeedback mutation requires a productId parameter. To get one, you can use the me query and use the first productId from your products list if you have multiple. If you don't have any, try to create a workspace first with our get-started path.

query me {
    me {
        id
        products {
            edges {
                node {
                    id
                    name
                }
            }
        }
    }
}

Once we have our productId, we can trigger the createFeedback mutation

mutation createFeedback {
    createFeedback(
        productId: "<productId>"
        title: "my first feedback from the api"
        customer: "customer@mail.com"
        source: { sourceWeb: { url: "https://www.mysupersite.com" } }
    ) {
        id
        title
        status {
            id
            value
        }
        customer {
            id
            email
        }
    }
}

3. Integrate the mutation in your app

Work in progress...

Last updated