> ## Documentation Index
> Fetch the complete documentation index at: https://platform.atlan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send feedback

> Tell the team building Agent Registry what is working, what is not, and what you need next.

export const FeedbackForm = () => {
  const ZENDESK_REQUESTS_URL = "https://atlan.zendesk.com/api/v2/requests.json";
  const CUSTOM_FIELD = {
    severity: 6561502777871,
    impact: 4419145659025,
    origin: 12456696904335
  };
  const PRODUCT_NAME = "Atlan Agent Registry";
  const SUPPORT_ROUTING_TAG = "agent_registry_for_feedback";
  const MESSAGE_MAX_LENGTH = 5000;
  const KINDS = [{
    value: "idea",
    label: "An idea",
    subject: "Idea",
    severity: "sev3__s3_",
    impact: "i_have_a_suggestion_that_will_help_me_with_my_use-case"
  }, {
    value: "problem",
    label: "Something broken",
    subject: "Problem",
    severity: "sev2__s2_",
    impact: "an_issue_is_slowing_me_down"
  }, {
    value: "question",
    label: "A question",
    subject: "Question",
    severity: "sev2__s2_",
    impact: "i_have_a_non-urgent_question"
  }];
  const [kind, setKind] = React.useState("idea");
  const [name, setName] = React.useState("");
  const [email, setEmail] = React.useState("");
  const [message, setMessage] = React.useState("");
  const [status, setStatus] = React.useState({
    state: "idle"
  });
  const chosen = KINDS.find(k => k.value === kind) ?? KINDS[0];
  const canSend = message.trim().length > 0 && email.includes("@") && name.trim().length > 0;
  const summarize = text => {
    const first = (text.trim().split("\n")[0] ?? "").trim();
    return first.length <= 80 ? first : `${first.slice(0, 77).trimEnd()}...`;
  };
  const submit = async event => {
    event.preventDefault();
    if (!canSend || status.state === "sending") return;
    setStatus({
      state: "sending"
    });
    const body = {
      request: {
        subject: `[${PRODUCT_NAME}] ${chosen.subject}: ${summarize(message)}`,
        comment: {
          body: [message.trim(), "", "---", `Submitted by: ${name.trim()} (${email.trim()})`, `Via: ${PRODUCT_NAME} feedback form (platform.atlan.com)`].join("\n")
        },
        requester: {
          name: name.trim(),
          email: email.trim()
        },
        tags: [SUPPORT_ROUTING_TAG],
        custom_fields: [{
          id: CUSTOM_FIELD.severity,
          value: chosen.severity
        }, {
          id: CUSTOM_FIELD.impact,
          value: chosen.impact
        }, {
          id: CUSTOM_FIELD.origin,
          value: PRODUCT_NAME
        }]
      }
    };
    try {
      const response = await fetch(ZENDESK_REQUESTS_URL, {
        method: "POST",
        headers: {
          "Content-Type": "application/json"
        },
        credentials: "omit",
        body: JSON.stringify(body)
      });
      if (!response.ok) throw new Error(String(response.status));
      const payload = await response.json().catch(() => null);
      const id = payload?.request?.id;
      setStatus({
        state: "sent",
        id: typeof id === "number" ? id : null
      });
      setMessage("");
    } catch {
      setStatus({
        state: "error"
      });
    }
  };
  if (status.state === "sent") {
    return <div role="status" className="not-prose rounded-xl border border-green-500/30 bg-green-500/5 p-6">
        <p className="m-0 font-medium">Thanks - we have it.</p>
        {status.id ? <p className="m-0 mt-2 text-sm opacity-80">
            Your ticket is #{status.id}.
          </p> : null}
        <button type="button" className="mt-4 cursor-pointer rounded-lg border px-3 py-1.5 text-sm" onClick={() => setStatus({
      state: "idle"
    })}>
          Send another
        </button>
      </div>;
  }
  return <form className="not-prose flex flex-col gap-5" onSubmit={submit}>
      <fieldset className="m-0 flex flex-col gap-2 border-0 p-0">
        <legend className="mb-1 p-0 text-sm font-medium">
          What kind of feedback?
        </legend>
        {KINDS.map(option => <label key={option.value} className="flex cursor-pointer items-center gap-2 text-sm">
            <input type="radio" name="feedback-kind" value={option.value} checked={kind === option.value} onChange={() => setKind(option.value)} />
            {option.label}
          </label>)}
      </fieldset>

      <label className="flex flex-col gap-2 text-sm font-medium">
        Your feedback
        <textarea rows={6} value={message} required maxLength={MESSAGE_MAX_LENGTH} placeholder="What happened, or what would you like to see?" onChange={event => setMessage(event.target.value)} className="w-full rounded-lg border p-3 text-sm font-normal" />
      </label>

      <div className="flex flex-col gap-5 sm:flex-row">
        <label className="flex flex-1 flex-col gap-2 text-sm font-medium">
          Your name
          <input type="text" value={name} required onChange={event => setName(event.target.value)} className="w-full rounded-lg border p-2 text-sm font-normal" />
        </label>
        <label className="flex flex-1 flex-col gap-2 text-sm font-medium">
          Reply to
          <input type="email" value={email} required onChange={event => setEmail(event.target.value)} className="w-full rounded-lg border p-2 text-sm font-normal" />
        </label>
      </div>

      {status.state === "error" ? <p role="alert" className="m-0 text-sm text-red-500">
          Could not send that. Please try again, or email{" "}
          <a href="mailto:ask@atlan.com">ask@atlan.com</a>.
        </p> : null}

      <div>
        <button type="submit" disabled={!canSend || status.state === "sending"} className="cursor-pointer rounded-lg border px-4 py-2 text-sm font-medium disabled:cursor-not-allowed disabled:opacity-50">
          {status.state === "sending" ? "Sending..." : "Send feedback"}
        </button>
      </div>
    </form>;
};

Agent Registry is early, and the fastest way to change it is to tell us what you
hit. Ideas, bugs, and questions all land in the same place and we read every one.

<Note>
  Using the desktop app? **Send feedback** in the account menu does the same
  thing and fills in your organization, app version, and the page you were on -
  so we can reproduce the problem without asking you for the details.
</Note>

<FeedbackForm />
