{"id":1194,"date":"2022-02-22T16:17:52","date_gmt":"2022-02-22T16:17:52","guid":{"rendered":"https:\/\/logicbuilder.integroscrm.com\/help\/?page_id=1194"},"modified":"2022-08-12T15:50:48","modified_gmt":"2022-08-12T15:50:48","slug":"add-teams","status":"publish","type":"page","link":"https:\/\/logicbuilder.integroscrm.com\/help\/add-teams\/","title":{"rendered":"Add Teams"},"content":{"rendered":"\n<p><a name=\"abstract\"><\/a>Adds Team or several Teams to the record.<\/p>\n\n\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<ul>\n<li>In Sugar each teamset for record consists of two components:&nbsp;<em>team_id<\/em>&nbsp;as Primary Team and&nbsp;<em>team_set_id<\/em>&nbsp;as all other teams.&nbsp;<strong><span style=\"color:#ec8f45;\">Add Teams<\/span><\/strong>&nbsp;works with&nbsp;<em>team_set_id<\/em>&nbsp;only.<\/li>\n<li>The recommended approach is to use&nbsp;<strong><span style=\"color:#ec8f45;\">Add Teams<\/span><\/strong>&nbsp;on After Save flowcharts than on Before Save.<\/li>\n<li>Do not use&nbsp;<strong><span style=\"color:#ec8f45;\">Save Entity<\/span><\/strong>&nbsp;to preserve team changes.&nbsp;<strong><span style=\"color:#ec8f45;\">Add Teams<\/span><\/strong>&nbsp;applies team changes itself.<\/li>\n<li>Despite any changes that might be applied with&nbsp;<strong><span style=\"color:#ec8f45;\">Add Teams<\/span><\/strong>, the standard Sugar logic, which ensures access of Assigned User to a record, works. Let\u2019s say that you created flowcharts and because of its execution teamset for the record do not contain any Team, to which an Assigned user belongs. In this case, standard Sugar behavior adds Assigned Users\u2019 Private Team.<\/li>\n<\/ul>\n<\/div>\n\n\n<p><strong>inputs:<\/strong><\/p>\n\n\n\n<p><span style=\"color:#ef6950;\">entity<\/span> \u2013 input the entity for which new team must be added<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Required: yes<\/li><\/ul>\n\n\n\n<p><span style=\"color:#6888c9;\">team ids array<\/span> \u2013 input an array or collection of Teams IDs or only one Team ID which must be added to the record.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Required: yes<\/li><\/ul>\n\n\n\n<p><strong>outputs:<\/strong><\/p>\n\n\n\n<p><span style=\"color:#ef6950;\"><em>entity<\/em><\/span> \u2013 the entity with the newly added team(s)<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-183-981ab3456fcd42ae8224292d9541d875.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-183-981ab3456fcd42ae8224292d9541d875-1024x352.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p><em>As a result of the flowchart execution team West is added to the set of teams of Account Record.<\/em><\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-183-4ef8f23d09904db8b125500f31fc4a05.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-183-4ef8f23d09904db8b125500f31fc4a05-1024x323.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p><em>As a result of the flowchart execution two teams West and Poland are added to the set of teams of Account Record.<\/em><\/p>\n\n\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<p><strong>I need to update an entity and change teams; how should I do this?<\/strong><\/p>\n<p>In one After Save flowchart.<\/p>\n<p>If you add (or remove) Teams and then update the record, any other flowchart that works on team change (for example, if you have implemented logic of teams inheriting from Account to related records) will be triggered.<\/p>\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-183-03b4b48212514b91b5b3e67a82b87126.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-183-03b4b48212514b91b5b3e67a82b87126-1024x239.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n<p>Otherwise \u2013 firstly, update the record, then update the Team \u2013 other flowcharts that work on team change won\u2019t be triggered.<\/p>\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-183-6465b681f37a43279a1ba2b00c0bc977.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-183-6465b681f37a43279a1ba2b00c0bc977-1024x253.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n<\/div><div style=\"text-align:left\" class=\"yasr-auto-insert-visitor\"><!--Yasr Visitor Votes Shortcode--><div id='yasr_visitor_votes_1194' class='yasr-visitor-votes'><div class=\"yasr-custom-text-vv-before yasr-custom-text-vv-before-1194\">Click to rate this post!<\/div><div id='yasr-vv-second-row-container-96f9390ee794f' \n                                        class='yasr-vv-second-row-container'><div id='yasr-visitor-votes-rater-96f9390ee794f'\n                                      class='yasr-rater-stars-vv'\n                                      data-rater-postid='1194' \n                                      data-rating='0'\n                                      data-rater-starsize='24'\n                                      data-rater-readonly='false'\n                                      data-rater-nonce='fa81b01ba5' \n                                      data-issingular='false'\n                                    ><\/div><div class=\"yasr-vv-stats-text-container\" id=\"yasr-vv-stats-text-container-96f9390ee794f\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" \n                               class=\"yasr-dashicons-visitor-stats\"\n                               data-postid=\"1194\" \n                               id=\"yasr-stats-dashicon-96f9390ee794f\">\n                            <path d=\"M18 18v-16h-4v16h4zM12 18v-11h-4v11h4zM6 18v-8h-4v8h4z\"><\/path>\n                          <\/svg><span id=\"yasr-vv-text-container-96f9390ee794f\" class=\"yasr-vv-text-container\">[Total: <span id=\"yasr-vv-votes-number-container-96f9390ee794f\">0<\/span>  Average: <span id=\"yasr-vv-average-container-96f9390ee794f\">0<\/span>]<\/span><\/div><div id='yasr-vv-loader-96f9390ee794f' class='yasr-vv-container-loader'><\/div><\/div><div id='yasr-vv-bottom-container-96f9390ee794f' class='yasr-vv-bottom-container'><\/div><\/div><!--End Yasr Visitor Votes Shortcode--><\/div>","protected":false},"excerpt":{"rendered":"<p>Adds Team or several Teams to the record. In Sugar each teamset for record consists of two components:&nbsp;team_id&nbsp;as Primary Team and&nbsp;team_set_id&nbsp;as all other teams.&nbsp;Add Teams&nbsp;works with&nbsp;team_set_id&nbsp;only. The recommended approach is to use&nbsp;Add Teams&nbsp;on After Save flowcharts than on Before Save. Do not use&nbsp;Save Entity&nbsp;to preserve team changes.&nbsp;Add Teams&nbsp;applies team changes itself. Despite any changes that &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/logicbuilder.integroscrm.com\/help\/add-teams\/\"> <span class=\"screen-reader-text\">Add Teams<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"tags":[],"class_list":["post-1194","page","type-page","status-publish","hentry"],"yasr_visitor_votes":{"number_of_votes":0,"sum_votes":0,"stars_attributes":{"read_only":false,"span_bottom":false}},"_links":{"self":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/comments?post=1194"}],"version-history":[{"count":5,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1194\/revisions"}],"predecessor-version":[{"id":2142,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1194\/revisions\/2142"}],"wp:attachment":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/media?parent=1194"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/tags?post=1194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}