As part of its biosignature detection package, the Mars 2020 rover will carry PIXL, the Planetary Instrument for X-ray Lithochemistry, a spatially resolved X-ray fluorescence (XRF) spectrometer. Understanding the types of biosignatures detectable by XRF and the rock types XRF is most effective at analyzing is therefore an important goal in preparation for in situ Mars 2020 science and sample selection. We tested mesoscale chemical mapping for biosignature interpretation in microbialites. In particular, we used XRF to identify spatial distributions and associations between various elements ("fluorescence microfacies") to infer the physical, biological, and chemical processes that produced the observed compositional distributions. As a test case, elemental distributions from XRF scans of stromatolites from the Mesoarchean Nsuze Group (2.98 Ga) were analyzed. We included five fluorescence microfacies: laminated dolostone, laminated chert, clotted dolostone and chert, stromatolite clast breccia, and cavity fill. Laminated dolostone was formed primarily by microbial mats that trapped and bound loose sediment and likely precipitated carbonate mud at a shallow depth below the mat surface. Laminated chert was produced by the secondary silicification of microbial mats. Clotted dolostone and chert grew as cauliform, cryptically laminated mounds similar to younger thrombolites and was likely formed by a combination of mat growth and patchy precipitation of early-formed carbonate. Stromatolite clast breccias formed as lag deposits filling erosional scours and interstromatolite spaces. Cavities were filled by microquartz, Mn-rich dolomite, and partially dolomitized calcite. Overall, we concluded that XRF is effective for inferring genetic processes and identifying biosignatures in compositionally heterogeneous rocks. Key Words: Stromatolites-Biosignatures-Spectroscopy-Archean. Astrobiology 17, 1161-1172.