title: Why integration bus executes 3 times on CreateObject event and why sitename is null during outgoing synchronisation in Kentico?
body: <p>I've installed a fresh new version of Kentico v12 and i'm using the basic goat template.</p>
  
  <p>I would like to be able to synchronize the creation of users and updating of personal informations of those users in the frontend application with a SAP webservice.</p>
  
  <p>I've added a new custom field in the user object "SAPID" and created a connector to manage the synchronization with SAP webservices.</p>
  
  <p>Here is my poc code:</p>
  
  <pre><code>public class CMSIntegrationConnector : BaseIntegrationConnector
  {
      /// &lt;summary&gt;
      /// Initializes the connector name.
      /// &lt;/summary&gt;
      public override void Init()
      {
          // Initializes the connector name (must match the code name of the connector object in the system)
          // GetType().Name uses the name of the class as the ConnectorName
          ConnectorName = GetType().Name;
           SubscribeToObjects(TaskProcessTypeEnum.AsyncSimple, PredefinedObjectType.USER);
      }
      public override IntegrationProcessResultEnum ProcessInternalTaskAsync(GeneralizedInfo infoObj, TranslationHelper translations, TaskTypeEnum taskType, TaskDataTypeEnum dataType, string siteName, out string errorMessage)
      {
          try
          {
              if (siteName == "DancingGoat")
              {
                  if (infoObj.TypeInfo.ObjectType == PredefinedObjectType.USER.ToString())
                  {
                      if (taskType == TaskTypeEnum.CreateObject)
                      {
                          EventLogProvider.LogInformation("Connector", "CreateUser", "User created on SAP !!!!!");
                          UserInfo user = infoObj.MainObject as UserInfo;
                          // Call SAP webservice
                          user.SetValue("SAPID", Guid.NewGuid());
                          UserInfoProvider.SetUserInfo(user);
                      }
                      else if (taskType == TaskTypeEnum.UpdateObject)
                      {
                          EventLogProvider.LogInformation("Connector", "CreateUser", "User updated on SAP !!!!!");
                          // Call SAP webservice
                      }
                  }
              }
          }
          catch (Exception ex)
          {
              EventLogProvider.LogException("Connector", "CreateUser", ex);
              errorMessage = ex.Message;
              return IntegrationProcessResultEnum.Error;
          }
          errorMessage = null;
          return IntegrationProcessResultEnum.OK;
      }
  }
  </code></pre>
  
  <p>Here is a dump of the values of parameters I get when I debug on a createobject event:
  <a href="https://i.stack.imgur.com/orsQS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/orsQS.jpg" alt="enter image description here"></a></p>
  
  <p>I have 2 issues.</p>
  
  <ul>
  <li>Why the parameter sitename is null ?</li>
  <li>Why it's executed 3 times successively on each CreateObject event ?</li>
  </ul>
  
  <p>I've checked this post: <a href="https://stackoverflow.com/questions/53951707/kentico-12-dancinggoat-mvc-sitename-is-empty-or-null">Kentico 12 DancingGoat MVC SiteName is empty or null</a></p>
  
  <p>Adding "localhost" in the domain alias of the site didn't work.</p>
  
  <p>Thank you by advance !</p>