We present the results of X-ray and optical observations of GRB 050712 performed by Swift . The X-ray lightcurve of this burst exhibits episodes of flares in the first 1000s , the same epoch at which the UVOT detected an optical counterpart . A shallow X-ray decay , with a decay slope of \alpha = -0.73 , followed and lasted \sim 70 ks . This behavior can be explained in terms of activity of the GRB “ inner engine ” , with the possibility that the last flare is caused by the interaction of the ejecta with the surrounding medium . We also find interesting spectral parameters for the X-ray emission . In particular , data suggests the presence of an intrinsic absorption in the first 1000s , which can be explained if circumburst medium clouds lie along the line of sight .