docs: @Indexable(type = IndexableType.REINDEX)
  	@Override
  	public CommercePriceEntry upsertCommercePriceEntry(
  			long commercePriceEntryId, long cProductId, String cpInstanceUuid,
  			long commercePriceListId, String externalReferenceCode,
  			BigDecimal price, BigDecimal promoPrice,
  			String skuExternalReferenceCode, ServiceContext serviceContext)
  		throws PortalException {
  
  		// Update
  
  		if (commercePriceEntryId > 0) {
  			try {
  				return updateCommercePriceEntry(
  					commercePriceEntryId, price, promoPrice, serviceContext);
  			}
  			catch (NoSuchPriceEntryException nspee) {
  				if (_log.isDebugEnabled()) {
  					_log.debug(
  						"Unable to find price entry with ID: " +
  							commercePriceEntryId);
  				}
  			}
  		}
  
  		if (Validator.isNotNull(externalReferenceCode)) {
  			CommercePriceEntry commercePriceEntry =
  				commercePriceEntryPersistence.fetchByC_ERC(
  					serviceContext.getCompanyId(), externalReferenceCode);
  
  			if (commercePriceEntry != null) {
  				return updateCommercePriceEntry(
  					commercePriceEntry.getCommercePriceEntryId(), price,
  					promoPrice, serviceContext);
  			}
  		}
  
  		// Add
  
  		if ((cProductId > 0) && (cpInstanceUuid != null)) {
  			validate(commercePriceListId, cpInstanceUuid);
  
  			return addCommercePriceEntry(
  				cProductId, cpInstanceUuid, commercePriceListId,
  				externalReferenceCode, price, promoPrice, serviceContext);
  		}
  
  		if (Validator.isNotNull(skuExternalReferenceCode)) {
  			CPInstance cpInstance =
  				_cpInstanceLocalService.getCPInstanceByExternalReferenceCode(
  					serviceContext.getCompanyId(), skuExternalReferenceCode);
  
  			validate(commercePriceListId, cpInstance.getCPInstanceUuid());
  
  			CPDefinition cpDefinition =
  				_cpDefinitionLocalService.getCPDefinition(
  					cpInstance.getCPDefinitionId());
  
  			return addCommercePriceEntry(
  				cpDefinition.getCProductId(), cpInstance.getCPInstanceUuid(),
  				commercePriceListId, externalReferenceCode, price, promoPrice,
  				serviceContext);
  		}
  
  		StringBundler sb = new StringBundler(9);
  
  		sb.append("{cProductId=");
  		sb.append(cProductId);
  		sb.append(StringPool.COMMA_AND_SPACE);
  		sb.append("cpInstanceUuid=");
  		sb.append(cpInstanceUuid);
  		sb.append(StringPool.COMMA_AND_SPACE);
  		sb.append("skuExternalReferenceCode=");
  		sb.append(skuExternalReferenceCode);
  		sb.append(CharPool.CLOSE_CURLY_BRACE);
  
  		throw new NoSuchCPInstanceException(sb.toString());
  	}