def METHOD_NAME(self):
    name = flask.request.form.get("name")
    protocol = flask.request.form.get("protocol")
    fields = {"name": name, "protocol": protocol}
    form_field_error = self.validate_form_fields(**fields)
    if form_field_error:
        return form_field_error
    id = flask.request.form.get("id")
    is_new = False
    if id:
        # Find an existing service in order to edit it
        service = self.look_up_service_from_registry(protocol, id)
    else:
        service, is_new = self._create_integration(
            self.protocols, protocol, self.goal
        )
    if isinstance(service, ProblemDetail):
        self._db.rollback()
        return service
    name_error = self.check_name_unique(service, name)
    if name_error:
        self._db.rollback()
        return name_error
    url = flask.request.form.get("url")
    url_not_unique = self.check_url_unique(
        service, url, protocol, self.goal
    )
    if url_not_unique:
        self._db.rollback()
        return url_not_unique
    protocol_error = self.set_protocols(service, protocol)
    if protocol_error:
        self._db.rollback()
        return protocol_error
    service.name = name
    if is_new:
        return Response(str(service.id), 201)
    else:
        return Response(str(service.id), 200)