/// <summary>
        /// Gets the commerce profile.
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <param name="profileName">Name of the profile.</param>
        /// <param name="profile">The profile.</param>
        /// <returns>The service provider result.</returns>
        private ServiceProviderResult GetCommerceProfile(string id, string profileName, ref Profile profile)
        {
            ServiceProviderResult result = new ServiceProviderResult {
                Success = true
            };

            try
            {
                var createArgs = new GetProfileArgs();
                createArgs.InputParameters.Name = profileName;
                createArgs.InputParameters.Id   = id;

                CorePipeline.Run(CommerceConstants.PipelineNames.GetProfile, createArgs);
                profile = createArgs.OutputParameters.CommerceProfile;
            }
            catch (Exception e)
            {
                result = new ServiceProviderResult {
                    Success = false
                };
                result.SystemMessages.Add(new SystemMessage {
                    Message = e.Message
                });
            }

            return(result);
        }
        /// <summary>
        /// Gets the commerce profile.
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <param name="profileName">Name of the profile.</param>
        /// <param name="profile">The profile.</param>
        /// <returns>The service provider result.</returns>
        private ServiceProviderResult GetCommerceProfile(string id, string profileName, ref Profile profile)
        {
            ServiceProviderResult result = new ServiceProviderResult { Success = true };

            try
            {
                var createArgs = new GetProfileArgs();
                createArgs.InputParameters.Name = profileName;
                createArgs.InputParameters.Id = id;

                CorePipeline.Run(CommerceConstants.PipelineNames.GetProfile, createArgs);
                profile = createArgs.OutputParameters.CommerceProfile;
            }
            catch (Exception e)
            {
                result = new ServiceProviderResult { Success = false };
                result.SystemMessages.Add(new SystemMessage { Message = e.Message });
            }

            return result;
        }