Creating assembly using a component stop at sensor

Hey can anyone point me in the right direction in terms of videos or guides to help me. I am xtrying to program a process when a box come on one conveyor and the sensor tells it to stop, I then have another conveyor with parts needed to going in the box to form a pattern then move to packing area. I am unsure of how to go about this I have done some coding seen below.