The fifth generation (5G) of mobile networks is emerging as a key enabler of modern factory automation (FA) applications that ensure timely and reliable data exchange between network components. Network slicing (NS), which shares an underlying infrastructure with different applications and ensures application isolation, is the key 5G technology to support the diverse quality of service requirements of modern FA applications. In this article, an end-to-end NS solution is proposed for FA applications in a 5G network. Regression approaches are used to construct a performance model for each slice to map the service level agreement to the network attributes. Interference coordination approaches for switched beam systems are proposed to optimize radio access network performance models. A case study of a non-public network is used to show the proposed NS approach.