Define CFOP attributes (direction/location) based on the country/state information of the origin or destination address, defines the location based on the transaction, and defines the direction.
It depends whether the trade is sending service/goods or receiving them. It also depends whether the trade is done with an outside partner, a partner in the same state, or a partner in a different state.